Knowledge Base

BROWSE TOPICS

Google Tag Manager Setup Guide

14 min read
Updated 22 Jul 2026

Online Buyer Survey Code

Bizrate Insights’ Online Buyer Survey Solution generates actionable Insights to improve your website’s performance by understanding the voice of your customer and their online experience.

To begin collecting the Voice of the Customer through Bizrate’s Online Buyer Survey Solutions, merchants must place Bizrate’s asynchronous JavaScript code on their order confirmation page. This will immediately allow you to collect feedback from customers who complete their purchase on your website

Once a survey is live on your website, data collection begins and results are available in real-time by accessing Bizrate’s online portal, VitalSigns.

Important Note | Bizrate Insights is committed to protecting customer privacy and will not store, rent, sell, or use customer email addresses provided to us by merchants for any purpose other than to send initial and reminder email survey invitations. These customer email addresses are deleted from the database once the survey invitations are emailed.

Control to Customize

We are constantly testing the latest tech to fully optimize the experience and shape the usability of our default invitation for all screen sizes. This ensures your customer’s experience with Bizrate Insights’ solutions is optimized across all desktop, tablet, and mobile screens. There are several ways to customize the Online Buyer Survey invitations without ever changing the code on your website. We make this simple by granting you access to a tool within VitalSigns to control the survey invitation experience for desktop, tablet, and mobile screens. While this interface is under development, please contact us, or your account manager, to update on your behalf.

Online Buyer customizations include:

  • Position of the invitation on your webpage – defaults centered in the browser window
  • Invitation look & design – default displays 500 x 455 pop-up window

Google Tag Manager Implementation

1. Add A New Tag

Add code via Google Tag Manager - Add a new tag

2. Tag Configuration

Choose a tag type to begin setup…

Tag Configuration

3. Choose Tag Type

Select Custom HTML

Google Tag Manager Setup Guide |

4. Enter the following snippet in the HTML Section

Select Custom HTML

Please note that the ##ORDER_ID##, ##EMAIL_ADDRESS##, and ##GTIN## placeholders below must be replaced with the data being called from your site.

<!- Please note that the ##ORDER_ID##, ##EMAIL_ADDRESS##, and ##GTIN## placeholders below must be replaced with the data being called from your site ->
<script type="text/javascript">
  var _cnx = _cnx || [];
  _cnx.push(['mid', '##INSERT_STOREMID_HERE##']); // your unique store MID
  _cnx.push(['surveyType', 'pos']);
  _cnx.push(['orderId', '##INSERT_ORDER_ID_HERE##']); // pass the customer's order ID number
  _cnx.push(['emailAddress', '##INSERT_EMAIL_ADDRESS_HERE##']); // pass the customer's email address
  _cnx.push(['gtin', '##INSERT_GTIN_HERE##']); // comma separate multiple gtins, 12 digit UPC/13 digit EAN - Required for Product Reviews

  (function(w, d, t) {
    var s = d.createElement(t);
    s.async = true;
    s.src = '//insights.bizrate.com/js/init.js';
    var h = d.getElementsByTagName(t)[0];
    h.parentNode.insertBefore(s, h);
  })(window, document, 'script');
</script>
Google Tag Manager Setup Guide |

5. Add your Google Tag Manager Variables

Add your Google Tag Manager variables in the snippet by wrapping the variable’s name in double braces. Below is an example of variables, unique to a merchant’s implementation.

<!- Example ->
<script type="text/javascript">
  var _cnx = _cnx || [];
  _cnx.push(['mid', 170739]); // your unique store MID
  _cnx.push(['surveyType', 'pos']);
  _cnx.push(['orderId', '{{Transaction ID}}']); // pass the customer's order ID number
  _cnx.push(['emailAddress', '{{Customer Email}}']); // pass the customer's email address
  _cnx.push(['gtin', '{{Product SKUs}}']); // 12 digit UPC/13 digit EAN - Required for Product Reviews

  (function(w, d, t) {
    var s = d.createElement(t);
    s.async = true;
    s.src = '//insights.bizrate.com/js/init.js';
    var h = d.getElementsByTagName(t)[0];
    h.parentNode.insertBefore(s, h);
  })(window, document, 'script');
</script>
Google Tag Manager Setup Guide |

Read more about adding Tag Manager variables in the custom html tag.

Read more about Google Tag Manager variables.

6. Choose a Trigger

Required

Click to configure a trigger type to begin setup. The tag should fire on the order confirmation page.

Read more about Google Tag Manager triggers here.

7. Publish the Tag

8. Verification

  1. Admin and under Container, click Install Google Tag Manager
  2. Follow the instructions by visiting the Quick Start Guide
Google Tag Manager Setup Guide |

9. Confirm Installation

After the tag has been successfully installed, make sure the tag configurations function as expected. Learn more here to enable preview mode.

Google Tag Manager Setup Guide |

Site Abandonment Survey Code

Bizrate Insights Site Abandonment Survey Solutions generate actionable Insights to improve your website’s performance by understanding your customer’s experience. Retailers are required to place Bizrate’s JavaScript code on their website to utilize Bizrate’s Site Abandonment Survey Solution.

We partner with Google Tag Manager, which allows easy implementation of the Bizrate Insights Site Abandonment Surveycode. Data collection begins immediately once the survey is live on your website; results can be viewed via the VitalSigns portal in near real-time (streaming soon).

Container Configuration

1. Create a web container for your website

* If you already have an account, skip to step 4

Google Tag Manager Setup Guide |

2. Read and accept Google Tag Manager Terms of Service Agreement

Google Tag Manager Setup Guide |

3. Navigate to the “WORKSPACE” tab and click on “ADD A NEW TAG”

4. Tag Configuration

Click on the tag icon to create a new tag

Google Tag Manager Setup Guide |

5. Choose Tag Type

Locate and click on Bizrate Insights Site Abandonment Solution. (Tip: Click on the search icon to the right of “Choose a tag type” and type in “bizrate”

Google Tag Manager Setup Guide |

6. Tag Configuration

Enter your MID Required
* Note: Ticket in wit h Google to update Connexity Merchant Id to Bizrate Merchant Id

Google Tag Manager Setup Guide |
  • Display Invite: Checked by default
  • Other fields: Hard-code a value or select the button to the right of the text field to choose one of the User-Defined Variables you create (see the “Creating variables” section below for information on creating your own variables)

Note: If using a User-Defined Variable, a corresponding Javascript must be included on your webpages in order to pass values to User-Defined Variables

7. Page Type

Select where you want to implement the Bizrate Site Abandonment Solution

Google Tag Manager Setup Guide |
  • Product Detail (product detail pages viewed before abandoning; requires variables)
    Ex: Product detail page with title, images, description, etc
    • Required: Product Id
    • Required: Current Selling Price
    • Required: Product Title
    • Required: Image URL
  • Cart (products added to the cart by visitors before abandoning; DOESN’T require variables) Ex: Shopping cart page
    • Required: None
      * Your website will lose actionable insights if data passing is ignored. We suggest passing all variables to take advant age of actionable insights
  • Checkout (products almost purchased by visitors before abandoning; DOESN’T require variables) Ex: Checkout page with payment options
    • Required: None
      * Your website will lose actionable insights if data passing is ignored. We suggest passing all variables to take
      advant age of act ionable insights.
  • Other (home page, category page, about us page, etc)
    • To implement tags on other page types, select “Cart” and leave “Cart Products” and “Cart Total” fields empty

8. Triggering

Tags must have at least one trigger in order to fire. The most commonly used trigger is Page View.

  • Triggers can be configured by selecting the trigger icon
  • Google Tag Manager Setup Guide |
  • Click the “+” in the upper-right corner to create a new triggerGoogle Tag Manager Setup Guide |
  • Select “Page View” from the “Choose trigger type” moduleTags can trigger on all page views or some page views
  • If “Some Page Views” is selected, you have the option to specify which page views you want the tag to trigger on, using the User-Defined Variables you createdSee “Creating custom triggers” section below for detailed information on how to create and use triggers
  • After configuring triggers, click “Save”
  • Click “Publish” in the top right corner of the dashboard. The Bizrate Site Abandonment Survey Solution tag is now configured and ready to use. Note: Remember to publish the tag, after each change, for changes to go into effect.

Creating Variables

1. Navigate to the “Workspace” tab

2. Select “Variables” from the left sidebar

3. Select “NEW” under “User-Defined Variables”

Google Tag Manager Setup Guide |

The module allows you to create and configure variables that you can pass into your tag. Google Tag Manager provides a number of different variable types; the most commonly used ones are the JavaScript Variable and the Data Layer Variable.

4. Click anywhere in the “Variable Configuration” box to begin configuring your variable

  • JavaScript Variable
    • Select “JavaScript Variable” from the “Choose variable type” module
    • Type in your JavaScript variable
    • Click “Save” and name the variable
    • The variable you created will now be visible in the “User-Defined Variables” module
  • Data Layer Variable
    • Select “Data Layer Variable” from the “Choose variable type” module
    • Type in your Data Layer Variable
    • Click “Save” and name the variable
    • The variable you created will now be visible in the “User-Defined Variables” module

Variables are now available for your Bizrate Insights Site Abandonment Survey Solution tag configuration

If you choose to pass values to the tag using User-Defined Variables, set these variables on your webpage

JavaScript variable example:

Google Tag Manager Setup Guide |

To use this variable, set the “cartTotal” variable in the JavaScript on your page:

<script type="text/javascript">
  var cartTotal = '999.99';
</script>

Data Layer variable example:

Google Tag Manager Setup Guide |

To use this variable, set the “orderIdData” variable in the data layer on your page:

<script>
  dataLayer = [];
  dataLayer.push({
    orderIdData: 'order123'
  });
</script>

Creating Custom Triggers

1. Select Choose a trigger to make this tag fire

Google Tag Manager Setup Guide |

2. In the “Choose a trigger” module, choose from a list of previously created triggers or click the “+” sign in the top right corner to create a custom trigger

Google Tag Manager Setup Guide |

3. Click the “+” sign to activate the Trigger Configuration module. Click anywhere in the module to begin

Example – set up a trigger that will only fire on a page with a specific pageType

  • Set up a new variable called “pageType” (see the “Creating variables” section for information on creating your own variables)
  • Google Tag Manager Setup Guide |
  • Set up a trigger named “homePage” using the “pageType” variable as a page view filter
    • From the Trigger Configuration module, choose “Page View” as the trigger type
    • Configure the trigger to fire on “Some Page Views”
  • Set up the condition under which the trigger will fire
    • Select the “pageType” variable from the first drop-down list
    • Select “equals” from the second drop-down list
    • Enter “home” in the third text box
    • Click “Save” and name the trigger “homePage”


    Google Tag Manager Setup Guide |

4. Configure your Bizrate Insights Site Abandonment Survey Solution tag to use the “homePage” trigger you’ve created

Google Tag Manager Setup Guide |

5. Add Javascript on your webpage to set pageType = ‘home’

<script>
  dataLayer = [];
  dataLayer.push({
    pageType: 'home'
  });
</script>

Setting up the Google Tag Manager code on your pages

1. Navigate to the “ADMIN” tab

2. Select your account, then select “Install Google Tag Manager” under the “Container” column

Google Tag Manager Setup Guide |

3. The next page includes Google Tag Manager’s code snippets, specific to your account. You will need to paste the code snippets on every page of your site.

Example below:

Copy the following JavaScript and paste it as close to the openingtag as possible on every page of your website, replacing GTM-XXXX with your container ID:

Basic Code Implementation <head>

<!- Add to HTML head on every webpage except order confirmation for site abandonment survey ->
<!- Paste this code as high in the <head> of the page as possible ->

<!- Google Tag Manager ->
<script>
  (function(w, d, s, l, i) {
    w[l] = w[l] || [];
    w[l].push({
      'gtm.start': new Date().getTime(),
      event: 'gtm.js'
    });
    var f = d.getElementsByTagName(s)[0],
        j = d.createElement(s),
        dl = l != 'dataLayer' ? '&l=' + l : ";
    j.async = true;
    j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl;
    f.parentNode.insertBefore(j, f);
  })(window, document, 'script', 'dataLayer', 'GTM-XXXXXX');
</script>
<!- End Google Tag Manager ->

Copy the following snippet and paste it immediately after the opening <body> tag on every page of your website, replacing GTM-XXXX with your container ID

Basic Code Implementation <body>

<!- Add immediately after the opening <body> tag on every webpage except order confirmation for site abandonment survey ->
<!- Google Tag Manager (noscript) ->
<noscript>
  <iframe src="https://www.googletagmanager.com/ns.html?id=GTM-XXXXXX"
          height="0″ width="0″
          style="display:none;visibility:hidden">
  </iframe>
</noscript>
<!- End Google Tag Manager (noscript) ->

See also: https://developers.google.com/tag-manager/quickstart

Examples

JavaScript variable example

User-defined variables list:

Google Tag Manager Setup Guide |

Bizrate Insights Site Abandonment Survey Solution configuration

Google Tag Manager Setup Guide |

JavaScript code on webpage

<script type="text/javascript">
  var referrerPage = 'Home Page';
  var referrerUrl = 'www.homepage.com';
  var referrerId = 'referrer123';
  var webAnalyticsID = 'webId456';
  var customValue1 = 'customOne';
  var customValue2 = 'customTwo';
  var customID = 'cid789';

  var cartProducts = [{
    id: 'sku',
    price: '9.99',
    originalPrice: '9.99',
    quantity: '1',
    imageUrl: 'http://mysite.com/images/products123.jpg',
    title: 'Example Product Title'
  }];

  var cartTotal = '999.99';
</script>

Data layer variable example

User-defined variable list

Google Tag Manager Setup Guide |

Bizrate Insights Site Abandonment Survey Solution configuration

Google Tag Manager Setup Guide |

Data layer code on webpage

<script type="text/javascript">
  var referrerPage = 'Home Page';
  var referrerUrl = 'www.homepage.com';
  var referrerId = 'referrer123';
  var webAnalyticsID = 'webId456';
  var customValue1 = 'customOne';
  var customValue2 = 'customTwo';
  var customID = 'cid789';

  var cartProducts = [{
    id: 'sku',
    price: '9.99',
    originalPrice: '9.99',
    quantity: '1',
    imageUrl: 'http://mysite.com/images/products123.jpg',
    title: 'Example Product Title'
  }];

  var cartTotal = '999.99';
</script>
Was this article helpful?
Your feedback helps us improve the docs.