Installing the Addrevenue tag in Google Tag Manager

We recommend using our simple tag from Google Tag Manager's Community Template Gallery to install tracking. This makes installation easier since you don't need to write any code yourself – you just select the tag type and map your variables.

Importing the Addrevenue tag

1. Go into your container in Google Tag Manager and click Tags → New.

2. Click the tag configuration (the pencil/icon at the top) to choose a tag type.

3. Click Discover more tag types in the Community Template Gallery (bottom right).

4. Search for Addrevenue and select our tag "Addrevenue - Tracking tag".

5. Click Add to workspace and then Add to accept the permissions.

Creating the base tag

The base tag loads our tracking script on all pages, but doesn't send a conversion.

1. Name the tag "Addrevenue - Base tag".

2. Select the tag type "Addrevenue - Tracking tag" that you just imported.

3. Leave the fields Value, Currency code and Order ID empty – the tag only sends a conversion if an Order ID is set, so without it only the tracking script is loaded.

4. Add the trigger "All Pages - Page View".

5. Click Save.

Known bug in GTM: if you click to create a new tag right after saving the base tag, the newly imported Addrevenue template won't show up in the list of tag types – and if you try to import it again, GTM will say it's already imported. The fix is to refresh the page in your browser before creating the next tag (the conversion tag below). After a refresh, Addrevenue will appear in the list of tag types as normal.

Creating the conversion tag

After refreshing the page as described above:

1. Create a new tag and name it "Addrevenue - Conversion tag".

2. Select the tag type "Addrevenue - Tracking tag".

3. Fill in the fields according to the table below, using variables from your data layer (dataLayer) that are normally set on the thank-you/receipt page.

4. Add a trigger for your purchase event, e.g. a page view of the thank-you/receipt page or a specific event.

5. Click Save.

Parameter mapping

You'll usually find these values as variables in your data layer (e.g. via a Data Layer Variable in GTM) on the thank-you/receipt page. If these variables haven't already been set up, they'll need to be created first. You may need to involve a developer, or contact our technicians at Addrevenue for help.

Value Variable. Decimal number of the order value, excluding VAT and shipping.
Currency code Variable. Currency code according to ISO 4217 (three letters), e.g. SEK.
Order ID Variable. String with the order number/transaction ID. Required for a conversion to be sent.
Discount codes Variable (optional). String with any discount code(s), separated by commas if more than one.
Products Variable (optional). Array of product objects, each containing id, name, quantity, price and category.
Conversion Event ID Text field. Must match the Conversion Event ID set up in your commission program. Default value: "Purchase".

Consent configuration

Both the base tag and the conversion tag must be configured to only trigger after the user has given consent for tracking and marketing. Activating these tags without consent may violate the ePrivacy Directive — the advertiser is responsible for handling consent correctly.

If you use Google Consent Mode v2:
Open each tag in GTM → Advanced SettingsConsent Settings → enable Require additional consent for tag to fire and add ad_storage.

If you use a CMP (Cookiebot, OneTrust, etc.):
Most CMPs offer a GTM integration that sets a data layer variable or triggers a custom event when consent is updated. Create a trigger that only fires when consent for marketing/tracking is given, and apply it to both tags instead of "All Pages – Page View". See your CMP provider's GTM integration guide for exact configuration.

If you don't use a consent platform:
You must implement one before using client-side tracking. Addrevenue recommends a CMP that supports Google Consent Mode v2.

Note: The conversion tag must never fire without consent, since it sends transaction data to a third-party server.

Testing the tracking

Once the tags are in place, use GTM's Preview mode to verify that the base tag loads the script on all pages and that the conversion tag sends an event with the correct values on the thank-you/receipt page. Then publish your changes in GTM.

Once you've installed the tracking code, we'd like you to make a test purchase. See our Test purchase guide for step-by-step instructions and troubleshooting help.

If you'd like help installing this in your existing Google Tag Manager container, you can invite tech-support@addrevenue.io with full read and write access, and we'll help you out!

 

Back