This Google Tag Manager server-side template allows you to implement Amazon Advertising tags on your website using Google Tag Manager's server-side capabilities.
- Operates on GA4 events
- Supports Measurement Token, an ID-less way of attributing ad clicks to a user
- Supports Match ID, enabling mapping of ID-less events to ID-have events via a user-unique value
- This feature is especially helpful when an advertiser only obtains user information part of the way through their flow
- In your Google Tag Manager server container, go to Templates
- Click "New" to create a new template
- Click "Import" and select the template.tpl file from this repository
- Save the template
After importing the template, you can create a new tag using this template. The tag configuration includes:
- Amazon Ad Tag IDs
- Event Name (standard or custom)
- Region selection
- Advanced Matching for User Data (optional)
- Off-Amazon Purchase Attributes (for Off-Amazon Purchase events)
- Default and Custom Attributes
- TCFv2 settings (optional)
- Amazon Consent settings
The tag will fire based on your configured triggers, typically on GA4 events. It handles:
- Token generation and management
- Sending event data to Amazon's advertising platform
- Applying consent settings as configured
- Measurement Token handling for cookieless attribution
- Match ID support for connecting anonymous and identified user events
- TCFv2 and Amazon Consent integrations for privacy compliance
For issues, questions, or contributions, please open an issue or pull request in this repository.
See CONTRIBUTING for more information.
This project is licensed under the Apache-2.0 License.