All Collections
Sales Tracking
Javascript Postback Tracking
How to Implement Client-Side Tracking in Google Tag Manager
How to Implement Client-Side Tracking in Google Tag Manager
Simma Baghbanbashi avatar
Written by Simma Baghbanbashi
Updated over a week ago

Integrating the TUNE tag for client-side tracking used to require editing the code of the website where the tag was to be used. Now, a publicly-available tag template can be used to set up the tag on any webpage that is already using Google Tag Manager without any further code changes required. The TUNE Tag has options for tracking both clicks and conversions.

💡 Javascript Postback must be selected as the conversion tracking method for your Aspire Offer to track conversions correctly.

Adding the TUNE Tag Template

Adding the template requires searching in Google’s community template gallery for TUNE’s tag template and accepting the associated permissions. This only needs to be done once per Google Tag Manager account.

  1. Navigate to the Templates section and click Search Gallery under the Tag Templates heading.

    Screen_Shot_2022-10-26_at_2.36.38_PM.png

    Note: If the "Search Gallery" or "New" options are not available, you likely have Read Only access. Make sure you are granted Publish access by your GTM Admin.

  2. Search “tune” in the community template gallery search bar, and click to add it to your workspace.

    Screen_Shot_2022-10-26_at_2.38.46_PM.png
  3. Accept the permissions associated with the template. Note that the script injection permission is only permitted to inject scripts from TUNE’s SDK domain, js.go2sdk.com. This allows us to place our tag template on your site.

    Screen_Shot_2022-10-26_at_2.40.12_PM.png

  4. The TUNE tag template will now be available for use in your Google Tag Manager account.

Adding a Click Tag

After adding the template to a Google Tag Manager account, you’ll want to create a tag for tracking clicks from your partners.

  1. Navigate back to the Tags section and click New to add a new tag.

  2. Click Tag Configuration. When asked to choose a tag type, select the TUNE Tag template.

    Screen_Shot_2022-10-26_at_2.53.00_PM.png

  3. Next, the tag needs to have the fields filled in. The values will depend on each individual use case, but at least one network and tracking domain pair are always required. Click Add a Network.

    Enter a Network ID (such as “Aspire”) and Aspire's tracking domain (https://aspireiq.go2cloud.org), then click Add.

    Screen_Shot_2022-10-26_at_2.50.46_PM.png

  4. Select the radio button for Click. When Click is selected, any of the TUNE click Parameters can be added. These click parameter fields are purely optional, and allow you to provide either a default value or an override value for a given parameter.

    Default parameters will only be used if the click URL does not already include a value for that parameter, while Override parameters will take precedence over the values in the URL.

    Here’s an example of a tag with some standard click parameters filled in:

  5. Each tag in Google Tag Manager needs a trigger to tell it when to fire. In general, the Click tag should be triggered on all pages except for the conversion page. That way a click will be tracked no matter which page on your site the user lands on.

    Below is an example of a TUNE tag set to Click with a default value “aff1value” to be set for aff_sub, and an override value “aff2value” to be set for aff_sub2.

  6. Save the tag.

Adding a Conversion Tag

  1. To track conversions, we’ll add a second tag. Navigate back to the Tags section and click New to add another new tag.

  2. When asked to choose a tag type, click the TUNE template, as before.

  3. Click Add a Network, enter the same Network ID and tracking domain (https://aspireiq.go2cloud.org) as before, then click Add.

  4. Select the Convert radio button. Click Add Conversion Parameter.

    At a minimum, you will need to add "amount" as a conversion parameter with your store's value for the order subtotal amount. An example value for Shopify brands would be {{ line_items_subtotal_price | money_without_currency }}.

    You will also need to add "adv_unique1" as a conversion parameter with your store's value for Order ID. An example value for Shopify brands would be {{ checkout.order_number }}.

    In addition, any of the optional TUNE parameters for a conversion link can be used. There is no concept of defaults and overrides with conversion parameters.

    Below is an example of what this would look like for a Shopify brand. Keep in mind that the values will vary depending on your eCommerce platform. Your engineering or eCommerce team should help you provide the desired information as a value for the "amount" and "adv_unique1" parameters.

  5. Select a trigger for the Conversion tag. In general, the Conversion tag should only be fired on the page that confirms a conversion has taken place, such as a “Thank you” page or an “Order Confirmation” page.

  6. Save the tag.

Additional Resources

For more information about Google Tag Manager, please refer to Google’s Tag Manager Help Center.

The information in this help article was adapted from TUNE.

Did this answer your question?