Tracking conversions with Google Ads through GTM

Tracking conversions with Google Ads through GTM, requires a few steps inside both Google Ads and GTM.

1. Set up your manual Conversion Action in Google Ads

2. Connect your GTM container to your landing page.

3. Set up your Tags and install the conversion tracking codes in GTM

4. Set up your Triggers in GTM

5. Set up the Conversion Linker tag and configure it to fire on all pages.

1. Set up your Conversion Action in Google Ads

It is recommended to set up the Conversion Action first, because you will need the Conversion ID and Conversion label later on as you progress with the setup.

Inside Google Ads, create a Conversion Action under Goals > Conversions. Ensure you choose the manual conversion action.

conversion action.png

Once you created your Conversion Action in Google Ads, you will find the Conversion ID and Conversion label (as seen above) under the Use Google Tag Manager tab. 

Next you can head over to GTM to set up your tags and triggers.

2. Connect your GTM container to your landing page.

In this guide you can find instructions for connecting your GTM container to your landing page.

3. Set up Tags and install the conversion tracking codes in GTM

In the Tags section, select New to create a tag. Give your Tag a relevant and distinguishable name. The Tag Configuration type must be Custom HTML. 

Below we provide conversion tracking code snippets for 1) Button Clicks and 2) Form Submissions and 3) Tracking Multiple Forms.

Depending on what event type you want to track, copy the relevant code and paste it inside your Custom HTML block.

gtm tag.png

Note: You must customise the code that is pasted inside the HTML block and replace the element-id (found on the landing page), Google Ads Tag ID and conversion label (found in Google Ads) with your own.

The code for tracking Button Clicks:

<!-- Begin “Google Ads conversion - Button Clicks” || Help center -->
<!-- Add to Settings-Javascript->Body -->
<!-- IN:20200120-18-1 -->
<script>
window.addEventListener('DOMContentLoaded', function () {
var element = document.querySelector("#element-123 a");
element.addEventListener("click", handler);
function handler() {
gtag('event', 'conversion', { 'send_to': 'AW-123456789/AbC-D_efG-h12_34-567' });
}
});
</script>
<!-- End “Google Ads conversion clicks” || Help center -->

The code for tracking Form Submissions

<!-- Begin "Google Ads conversion - Form Submissions" || Help center -->
<!-- Add to Settings-Javascript->Body -->
<!-- IN:20200120-18-2 -->
<script type="text/javascript">
window.instapageFormSubmitSuccess = function( form ){
gtag('event', 'conversion', {'send_to': 'AW-824974433/OmEeCPPw54gDEMK4sIkD'});
};
</script>
<!-- End "Google Ads Conversion" || Help center -->

The code for tracking multiple forms:

<!-- Begin "Google Ads conversion - Multiple Forms" || Help center -->
<!-- Add to Settings-Javascript->Body -->
<script>
window.instapageFormSubmitSuccess = function (form, wid) {

if (wid === 3) {
gtag('event', 'conversion1', { 'send_to': 'AW-123456789/AbC-D_efG-h12_34-567' });
}
else if (wid === 7) {
gtag('event', 'conversion2', { 'send_to': 'AW-123456789/AbC-D_efG-h12_34-567' });
}
else {
// do nothing
}

};
</script>

Make sure to edit the correct wid in the code above for both forms if you are tracking multiple forms. The wid can be found on the landing page inside the Inline Style Editor as seen below: 

wid ID.gif

4. Set up Triggers in GTM

You also have to set up a Trigger. Below are example triggers for both Button Clicks and Form Submissions. Depending on the Tag for the conversion tracking event you created above, now also create the relevant Trigger.

Trigger example for Button Clicks:

clicktrigger.png

Note: The example trigger is set to fire on a CTA button on a landing page that redirects to a specific URL, in this case, thebuttonURL.com. However, keep in mind that you should set up your tags and triggers in such a way that works with your overall implementation.

Trigger example for Form Submissions:

form submit event.png

5. Set up the Conversion Linker tag

Last but not least, ensure that you add a Conversion Linker tag and configure it to fire on all of your pages.