This Google Tag Manager (Server-Side) custom variable template extracts product IDs from the GA4 items
array and prepares them for dynamic remarketing with Google Ads. It is designed to simplify the integration of Google Ads Remarketing by handling data collection directly from server-side events.
- Retrieve Item IDs: Extracts product IDs (
item_id
by default) from theitems
array in GA4 event data. - Event-Aware: Logs warnings if
items
are missing in non-page_view
events. - Dynamic Configuration: Allows customization of the ID field through template parameters.
Parameter Name | Type | Description | Default Value |
---|---|---|---|
idField |
TEXT | Field name for product IDs | item_id |
Please raise any issues on GitHub or contact us directly at [email protected].
The Google Ads Remarketing - ecomm_prodid variable for GTM Server-Side is developed and maintained by Addingwell under the Apache 2.0 license.