Google Tag Manager (GTM) for Tracking

Google Tag Manager is a tag management solution that allows you to set up and publish tags on your website or mobile app using a simple web-based interface.

Integrating GTM Tag on Your ‘Thank You’ Page

  1. First, navigate to the ‘Campaigns‘ section > ‘Add a CampaignorEdit‘ (for an existing campaign):
  1. After selecting a campaign, click on the ‘Tracking‘ tab > scroll to the bottom of the page and select the ‘Image‘ section and copy the code.
  1. Let’s get started creating your tag on the ‘Google Tag Manager‘, the first step is to add a ‘Trigger‘.

Go to ‘Triggers’ and click on ‘New’:

  1. Select ‘Page View’ and add your ‘Thank You’ page HTML:

The 'Thank You' page is the landing page that appears after the customer has completed a purchase.

  1. Navigate to ‘Tags‘:
  1. Go to Tags and create ‘New Tag‘ type and select ‘Custom HTML
  1. Add the Img pixel code inside the ‘Custom HTML‘ and select the ‘Thank you page‘ Triggering.
  1. Save‘ and your tag is ready!

Integrating GTM Tag with Parameters

If you have already sent the Order Amount and Order ID to the GTM, you can use the parameters within the GTM configuration.

Please see all the parameters that can be sent to Tracknow here: Postback/Tracking Parameters

An example of store that sending parameters to the layer of GTM:

<script type='text/javascript'>
   var order_amount = document.getElementById("order_amount").value;
   var order_id = document.getElementById("order_id").value;

  dataLayer.push({ 
    'order_amount': order_amount,
    'order_id': order_id }); 
</script>
  1. In GTM> go to ‘Variables‘ and click on ‘New‘:
  1. Click on ‘Data Layer Variable‘:

Do the same for Order ID and any other parameters you want to send to Tracknow.

  1. Navigate to ‘Tags‘ and use the variables contained within the Tracknow custom HTML.
<!--Campaign Conversion:  --> 
  <img src='https://yourdomain.tracknow.info/success.jpg?campaign_id=1&order_id={{Order ID}}&amount={{Order Amount}}' height="1" width="1" alt=""/> 
 <!-- End Campaign Conversion -->

If you have any issues setting up the GTM for Tracking, please contact the ‘Tracknow’ Support Team by clicking ‘here‘, we will do our best to answer all of your inquiries.

Related Articles