In this guide, we’ll walk you through how to initialize Amplitude and set up revenue tracking using GTM — step by step.
Step 1: Add the Amplitude Browser SDK in GTM
- Go to your Google Tag Manager workspace.
- Click on Templates → Search Gallery.
- Look for the Amplitude Browser SDK in the GTM Community Template Gallery.
- Add the template to your workspace and save it.

This will allow you to create Amplitude tags directly inside GTM.
Step 2: Set Up the Amplitude Initialization Tag
Now that the SDK is installed, you’ll need to initialize it.
- Create a new tag and select Amplitude → Initialize as the tag type.
- Enter your Amplitude API key. You can find this in your Amplitude project settings under Settings → Projects → API Key.
- Set the trigger to Initialization – All Pages.

This ensures Amplitude loads on every page before any other event tags fire.
Step 3: Create the Revenue Tracking Tag
With initialization done, it’s time to set up revenue tracking for purchases.
- Create another new tag.
- Choose Amplitude → Track Revenue as the tag type.

- Create following required parameters:
- Product ID: Create a GTM variable called product_id and set it as a Data Layer Variable.
- Product Name: Create another variable to capture the product name.
- Product ID: Create a GTM variable called product_id and set it as a Data Layer Variable.

- Value: Create a variable that captures the transaction value.

- Currency: Create a variable that holds the purchase currency (e.g., USD, EUR).

- Add these parameters into your Revenue Tag setup in GTM.

Step 4: Add a Purchase Trigger
- Set the trigger to fire on your site’s purchase event (e.g., event = purchase from the data layer).
- Save the tag.

This ensures Amplitude records revenue whenever a successful purchase is completed.
Step 5: Test and Publish
Use GTM Preview Mode to confirm that:
- The Amplitude Initialization Tag fires on all pages.
- The Revenue Tag triggers correctly on purchase events.
Once confirmed, publish your container.
That’s It!
You’ve successfully integrated Amplitude revenue tag with Google Tag Manager! Now, all purchase and revenue data will flow directly into Amplitude, where you can analyze user behavior, track funnels, and optimize conversions — all without touching your website code again.
