Say you’re marketing department comes to and they want to run an ad campaign with Google AdWords and they want to be able to track conversions (how many people visited the site, clicked on a button, submitted a form, etc.).

You could just use Google Adwords to do this, but if you ever want to add additional conversion tracking (say they also want to run a Facebook [FB] ad campaign and track conversions for that) you would need to add script tags for FB to each page as well. You would then, also need to add special HTML code to track button clicks if you were just using AdWords and FB.

Instead of adding script tags for multiple tracking services, with Google Tag Manger (GTM) you can consolidate all of your tracking services in one central location and then only add script tags for GTM. GTM also has automatic event tracking (link click detection, form submission, etc.) so you won’t have to add any special HTML code to detect these actions.

Your page will generally have many tags and you will control when these tags fire with triggers. You control when a trigger is fired by using a variable with conditions that evaluate to true or false at runtime. For example, if you have a button and you want to track when someone clicks that button, you would create a trigger that fires x tag (where x=a FB or AdWords conversion) when the link click variable meets the condition ‘the href of the link is

How to use GTM to track AdWords and FB click conversions

AdWords Instructions

  1. Create a new conversion for the link click (Tools > Conversions)
  2. After creating the conversion you will see an ‘Install your tag’ section and you should ensure that ‘Page load’ is selected for ‘Choose whether to track conversions on a page load or a click’. Note: This seems counterintuitive since we are trying to detect a link click, but since we can control when the conversion is triggered in GTM (using variables wit conditions) we don’t need to use AdWords method of detecting link clicks (adding onclick to commands to your<a>tags)
  3. Take note of the ‘Tag for Request a Demo’ as we’ll need the google_conversion_id and google_conversion_label for GTM

GTM Instructions

  1. Setup GTM for your website (or app)
  2. Enable the ‘Click URL’ built in variable (Workspace > Variables > Built-in Variables > Configure)
  3. Create a new Click trigger and give the trigger a descriptive name (We’ll use ‘The most important link click’)
  4. Configure the trigger to only fire on ‘Some Clicks’
  5. Choose ‘Click URL’ equals
  6. Create a new Tag and in the Tag Configuration choose AdWords Conversion Tracking. Add the google_conversion_id and google_conversion_label for the tag.
  7. Choose the Trigger you set up in steps 3–5 (‘The most important link click’ our case)

Congrats! You now have link click tracking conversion set up for AdWords. Now let’s do the same for Facebook.

Facebook Instructions

GTM doesn’t have native support for Facebook but luckily Facebook has a wizard that can automatically add Tags to GTM

  1. Create a Custom Conversion (Hamburger menu > Measure & Report > Custom Conversions)
  2. Create a Facebook Pixel (Hamburger menu > Assets > Pixels)
  3. You should then be taken into a wizard the will help you install your Pixel code. Choose ‘Use an Integration or Tag Manager’ and then Google Tag Manager. Then choose ‘Quick Install’.
  4. Then, on Step 3 of the Fig. 1.1 you will want to add a Tag for the link click.
  5. Then, go back into GTM and click on the newly created Tag
  6. In Triggering, remove the Page Load trigger and add ‘The most important link click’ trigger.
Fig 1.1

Now, whenever someone clicks on a link that has an href of our AdWords and Facebook conversions will be triggered.

Wrapping up

When I first started this project, I thought I would need to do a lot more coding, but GTM’s automatic event tracking made adding additional code unnecessary. At first this was confusing, but after I created a few triggers and tags and used the preview mode to confirm everything was working, I began to understand how simple it is to do conversion tracking using a Tag Manager.