Google Ads
Google Ads is Google's comprehensive advertising platform. The walker.js Google Ads destination enables seamless integration of your web application with Google Ads.
Installation
- TypeScript
- Script
- Code
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);
Load the destination via dynamic import
<script>
// Upload the dist/index.mjs on your own server
const destination = (
await import(
'https://cdn.jsdelivr.net/npm/@elbwalker/destination-web-google-ads/dist/index.mjs'
)
).default;
elb('walker destination', destination, config);
</script>
Copy the code from the index.browser.js file
(function () {
'use strict';
var Destination = (() => {})(); // This is the copied code
elb('walker destination', Destination.default, config);
})();
Configuration
Configure the Google Ads destination with a Conversion ID and Conversion label.
Example
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
Property | Type | Description |
---|---|---|
conversionId* | string | Google Ads conversion ID, starting with 'AW-'' . |
currency | string | Default currency for conversions. |
defaultValue | number | Default value used for conversions. |
CustomEvent
For the custom event mapping (mapping.entity.action.custom
):
Property | Type | Description |
---|---|---|
label* | string | Google Ads Conversion label. |
id | string | Property key to use as transaction ID. |
value | string | Name of the data property key to use for value. |
info
If you need professional support with your walkerOS implementation, check out our services.