Skip to main content

Google Ads

Web Source code Package

Google Ads conversion tracking within the unified gtag destination. This enables you to track conversions and measure the effectiveness of your Google Ads campaigns.

Installation

npm install @walkeros/web-destination-gtag

Setup

import { createCollector } from '@walkeros/collector';
import { destinationGtag } from '@walkeros/web-destination-gtag';

const { elb } = await createCollector();

elb('walker destination', destinationGtag, {
settings: {
ads: {
conversionId: 'AW-XXXXXXXXX', // Required
currency: 'EUR', // Default currency for conversions
},
},
mapping: {
order: {
complete: {
settings: {
ads: {
label: 'purchase_conversion', // Conversion label for order complete
},
},
},
},
},
});

// Track an order complete event
elb('order complete', {
id: 'order-123',
value: 49.99,
currency: 'EUR',
items: 2,
});

Configuration reference

PropertyTypeDescriptionMore
conversionId*stringGoogle Ads conversion ID from your Google Ads account
currencystringDefault currency code for conversion values
* Required fields

Event Mapping

For custom event mapping (mapping.entity.action.settings.ads):

PropertyTypeDescriptionMore
labelstringConversion label for this specific event
💡 Need Professional Support?
Need professional support with your walkerOS implementation? Check out our services.