Install Google Ads Remarketing Tag in BigCommerce

Install Google Ads Remarketing Tag in BigCommerce

Get The Google Ads Remarketing Code

Login to Google Ads, then in the top right corner click on the 3dot menu and select Audience Manager from the Shared Library section

Google Adwords Audience Manager
If you already have a remarketing code, skip this section and go to the next section with continue here.

Click on setup audience list

Google Adwords Setup Audience List

Then click on setup tag

Google Adwords Setup Tag

(continue here) From the left hand, menu click on Audience Source and click on the 3dot menu and choose edit source within the Adwords tag section

Google Adwords Audience Sources

Select the following:

  • Dynamic Remarketing
    • Collect specific attributes or parameters to personalize ads
  • Business Type
    • Retail
  • Retail Parameters
    • ecomm_pagetype
    • ecomm_prodid
    • ecomm_totalvalue
Google Adwords Tag Data Source

Than download snippet, save this in a text editor file as reference for the instructions below.

Edit Theme Files

Edit Theme by going to Storefront > My Themes > Inside the current theme, click on Advanced > Edit Theme Files

BigCommerce Edit Theme FIles

Product Page

Navigate to : templates/components/products/product-view.html

At the bottom of the file, paste the code below.

Important! :

  1. Change the XX-XXXXXXXXX three times with the value found in your downloaded script example gtag(‘config’, AW-123456798‘);
    1. <script async src=”https://www.googletagmanager.com/gtag/js?id=XX-XXXXXXXXX”></script>
    2. gtag(‘config’, ‘XX-XXXXXXXXX’);
    3. ‘send_to’: ‘XX-XXXXXXXXX’,
<!-- Global site tag (gtag.js) - Google Ads Tag Created By FeedArmy for product page -->
<script async src="https://www.googletagmanager.com/gtag/js?id=XX-XXXXXXXXX"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'XX-XXXXXXXXX');
</script>
<script>
  gtag('event', 'page_view', {
    'send_to': 'XX-XXXXXXXXX',
    'ecomm_pagetype': 'product',
    'ecomm_prodid': '{{ product.id }}',
    'ecomm_totalvalue': {{product.price.with_tax.value}}
  });
</script>

Search Page

Navigate to : templates/components/search/heading.html

At the bottom of the file, paste the code below.

Important! :

Change the XX-XXXXXXXXX three times with the value found in your downloaded script example gtag(‘config’, AW-123456798‘);

  1. <script async src=”https://www.googletagmanager.com/gtag/js?id=XX-XXXXXXXXX”></script>
  2. gtag(‘config’, ‘XX-XXXXXXXXX’);
  3. ‘send_to’: ‘XX-XXXXXXXXX’,
<!-- Global site tag (gtag.js) - Google Ads Tag Created By FeedArmy for search page-->
<script async src="https://www.googletagmanager.com/gtag/js?id=XX-XXXXXXXXX"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'XX-XXXXXXXXX');
</script>
<script>
  gtag('event', 'page_view', {
    'send_to': 'XX-XXXXXXXXX',
    'ecomm_pagetype': 'searchresults'
  });
</script>

Home Page

Navigate to : templates/pages/home.html

At the bottom of the file, paste the code below.

Important! :

Change the XX-XXXXXXXXX three times with the value found in your downloaded script example gtag(‘config’, AW-123456798‘);

  1. <script async src=”https://www.googletagmanager.com/gtag/js?id=XX-XXXXXXXXX”></script>
  2. gtag(‘config’, ‘XX-XXXXXXXXX’);
  3. ‘send_to’: ‘XX-XXXXXXXXX’,
<!-- Global site tag (gtag.js) - Google Ads Tag Created By FeedArmy for home page-->
<script async src="https://www.googletagmanager.com/gtag/js?id=XX-XXXXXXXXX"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'XX-XXXXXXXXX');
</script>
<script>
  gtag('event', 'page_view', {
    'send_to': 'XX-XXXXXXXXX',
    'ecomm_pagetype': 'home'
  });
</script>

Cart Page

Navigate to : templates/components/cart/content.html

At the bottom of the file, paste the code below.

Change the XX-XXXXXXXXX three times with the value found in your downloaded script example gtag(‘config’, AW-123456798‘);

  1. <script async src=”https://www.googletagmanager.com/gtag/js?id=XX-XXXXXXXXX”></script>
  2. gtag(‘config’, ‘XX-XXXXXXXXX’);
  3. ‘send_to’: ‘XX-XXXXXXXXX’,
<!-- Global site tag (gtag.js) - Google Ads Tag Created By FeedArmy for cart page-->
<script async src="https://www.googletagmanager.com/gtag/js?id=XX-XXXXXXXXX"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'XX-XXXXXXXXX');
</script>
<script>
  gtag('event', 'page_view', {
    'send_to': 'XX-XXXXXXXXX',
    'ecomm_pagetype': 'cart',
    'ecomm_prodid': '[{{#each cart.items}}{{product_id}},{{/each}}]',
    'ecomm_totalvalue': {{cart.grand_total.value}}
  });
</script>

Checkout

Go to Advanced Settings > Affiliate Conversion Tracking

BigCommerce Install Conversion Tracking

Paste the below code in the box and save

Change the XX-XXXXXXXXX three times with the value found in your downloaded script example gtag(‘config’, AW-123456798‘);

  1. <script async src=”https://www.googletagmanager.com/gtag/js?id=XX-XXXXXXXXX”></script>
  2. gtag(‘config’, ‘XX-XXXXXXXXX’);
  3. ‘send_to’: ‘XX-XXXXXXXXX’,
<!-- Global site tag (gtag.js) - Google Ads Tag Created By FeedArmy for checkout page-->
<script async src="https://www.googletagmanager.com/gtag/js?id=XX-XXXXXXXXX"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'XX-XXXXXXXXX');
</script>
<script>
  gtag('event', 'page_view', {
    'send_to': 'XX-XXXXXXXXX',
    'ecomm_pagetype': 'checkout',
    'ecomm_totalvalue': %%ORDER_AMOUNT%%
  });
</script>

Need Help?