How to set up Google Ads conversion tracking on Bigcommerce with GTM

Instructions for setting up Google Ads conversion tracking on a Bigcommerce store with Google Tag Manager. Today we’ll set up the Google Ads conversion tracking on a Bigcommerce site using Google Tag Manager. We will be doing it in three places:

What's in this article

Instructions for setting up Google Ads conversion tracking on a Bigcommerce store with Google Tag Manager.

Today we’ll set up the Google Ads conversion tracking on a Bigcommerce site using Google Tag Manager. We will be doing it in three places:

  • Google Ads
  • Google Tag Manager
  • Bigcommerce Store

Setting up Google Ads

Select Tools and settings, conversions, and create a conversion  action of conversion source – website and these settings:

  • Conversion name can be anything
  • Goal and action optimization – purchases, primary action
  • Value – use different values
  • Count – Every conversion
  • Click-through conversion window – set to a higher number than your conversion lag. If ti takes a visitor 7 days on average from the first ad iteration to purchase, set it to 10 or 30 days
  • Engaged-view conversion window – 1 to 3 days
  • View-through conversion widow – 1 to 3 days
  • Attribution model – select Data-driven if available. Avoid last click and first click attribution models
A configured Google Ads conversion acton

Setting up Google Tag Manager

Data Layer Variable for revenue

Now, let’s set up Google Tag Manager.

Click on Variables, user-defined variables and create a variable of a type Data Layer Variable.

Title it Ecommerce Revenue.

As a name use ecommerce.purchase.actionField.revenue. You can use a different name but then you’d have to change the custom code in the checkout page.

The GTM Data Layer variable

Conversion Trigger

Create the trigger of type Custom event.

Set the event name as conversion. If using different name, apply it in the 4th line of the custom code in the checkout page.

GTM Conversion Trigger

Conversion Tag

Create a Tag of the type Google Ads Conversion Tracking

  • Conversion ID – paste the value from the Google Ads Conversion Action that was created earlier
  • Conversion Label – paste the value from the Google Ads Conversion Action
  • Conversion Value – click though and select the Ecommerce Revenue variable created earlier
GTM Conversioin Tag

Conversion Linker

Create a tag of type Conversion liner, set it triggered on all pages, name it Conversion Linker

Setting up Bigcommerce

Adding the GTM code

The GTM code has two parts. Both need to be added on every page of the Bigcommerce site.

To locate the code, click on the blue GTM ID in the Google Tag Manager window.

How to locate the GTM code

The first part of the code goes in the head section, and the second part goes in the body section.

The two parts of the GTM code

In the Bigcommerce admin panel, click Themes, Advanced, Edit theme files, Templates, Layout and then click on base.html.

The Themes menu in the Bigcommerce admin panel

Add the first part of the code between the <head> and </head> tags.

Positioning the first part of the GTM code in the base.html file

Add the second part into the body section below the <body> tag.

Positioning the second part of the GTM code in the base.html file

The custom code for the checkout page

In the Bigcommerce admin panel click Settings, Data Solutions, Affiliate conversion tracking.

Copy and paste the below code into this  window in affiliate conversion tracking.

<script>

window.dataLayer = window.dataLayer || [];

window.dataLayer.push({

‘event’: ‘conversion’,

  ‘ecommerce’: {

      ‘purchase’: {

      ‘actionField’: {

        ‘id’: ‘%%ORDER_ID%%’,                         

        ‘revenue’: ‘%%ORDER_AMOUNT%%’,

                        }    

                   }              

                }

});

</script>

Custom code for the checkout page

Verifying that conversion tracking is working

In a few minutes after applying changes, you will see the conversion status in the Conversion action window will change to “recording conversions”.

Vefifying that conversion tracking is working

Once the conversions start to arrive, their number and values will appear. It means that your conversion tracking is working properly.

Conclusion

With fewer Google Ads controls available today, the correct conversion data becomes ever more important in optimizing your campaigns.

 

Related Posts