Skip to main content

Google Ads

Source code Package Browser ES5

Google Ads is Google's comprehensive advertising platform, widely used for displaying ads across various tools and websites. The walker.js Google Ads destination enables seamless integration of your web application with Google Ads, facilitating effective tracking and management of conversion events.

Configuration

Begin by configuring the destination settings. The destination can be utilized in both a Node environment and directly in the browser.

const config = {
custom: {
conversionId: 'AW-123456789', // Required
currency: 'EUR',
defaultValue: 1,
},
mapping: {
// e.g. order
entity: {
// e.g. complete
action: {
custom: {
label: 'abc', // Required
id: 'order_id',
value: 'revenue',
},
},
},
},
};

Custom

PropertyTypeDescription
conversionId*stringThe Ads account ID used for every conversion.
currencystringThe default currency for conversions.
defaultValuenumberDefault value used for conversions.

CustomEvent

For the custom event mapping (mapping.entity.action.custom):

PropertyTypeDescription
label*stringConversion label.
idstringProperty key to use as a transaction ID.
valuestringName of the data property key to use for value.

How to use

First, define the config that you want to use for the destination:

const config = {
custom: {
conversionId: 'AW-123456789',
},
mapping: {
order: {
complete: {
custom: {
label: 'abc',
},
},
},
},
};

This will send a conversion event to Google Ads for the order complete event.

Choose one of the following installation options to use the destination:

Install the destination via npm

npm i @elbwalker/destination-web-google-ads
import { elb } from '@elbwalker/walker.js';
import destinationGoogleAds from '@elbwalker/destination-web-google-ads';

elb('walker destination', destinationGoogleAds, config);