On this page

Google Tag Manager (legacy)

This is the client-side Google Tag Manager Template for Amplitude Analytics. The tag uses the Maintenance Amplitude JavaScript SDK for data collection.

This is a legacy template

This is a legacy GTM template. Use the latest template for the most up-to-date implementation.

Migration

The Amplitude Analytics Legacy template, currently using the Maintenance Amplitude JavaScript SDK for data collection, is only slated for bug fixes until its eventual deprecation. Use the latest GTM template that uses Amplitude's Marketing Analytics SDK for data collection. This not only ensures better support but also offers access to a host of new features.
  • The latest template isn't backwards compatible with this legacy template because of the non-backwards compatibility of the internal SDK. It does a cookie migration logic to help the transition of legacy cookies information to the latest cookie storage system.
  • For a comprehensive migration guide, refer to the Migration guide.
  • To understand the behavioral differences between the old and new templates, refer to the comparison section.

Here are the breaking changes:

EU data residency

For EU data residency, you must set up your project inside Amplitude EU and use the API key from Amplitude EU. You can configure the server zone by checking the checkbox EU Data Residency under Tag Configuration > Initialization.

Was this helpful?