Using Google Tag Manager to Place Code

Adding a Custom HTML Tag to Google Tag Manager

To add FuelX Tracking Code to Google Tag Manager, you must have an account with Google Tag Manager. If you do not have the Google Container on your website, follow Google’s instructions to place the Google Container on each of your site pages.

  1. Once the container is in place, open the Container from the Accounts page.
  2. Select the Container where you want to add the FuelX Tracking Code.
  3. In the Container’s page, click the red “NEW” button and select Tag.
  4. Name the Tag and under Tag Type select Custom HTML Tag.
  5. Copy and paste the FuelX Tracking Code into the HTML box.
  6. Be sure to click "Save" to finish implementing the code.

Your Conversion Pixel with Google Tag Manager

To track conversions using Google Tag Manager, you will need to add a Data Layer on top of your container snippet or add Macros for order ID, order value and product ID.

Adding a Data Layer

  1. Create the Data Layer Variable
    1. Under Macros Select “element id”
    2. Rename the Macro Name field
    3. Under Macro Type select Data Layer Variable
    4. Name the Data Layer Variable
    5. Set default value as 0
    6. The Data Layer Variable will save under your Macros list in the side navigation
    7. Repeat the process for order id and order value
      1. To create a Macro for multiple product ids, create a Data Layer Variable for “pids”
      2. Follow the steps a-f but replace the [pid]%/[pid]%/[pid] with a “pids” Macro in the actual conversion code
  2. Create the tag or update the existing conversion tag
    1. Paste our conversion code into the HTML input field
    2. Replace [orderid], [ordervalue], and [pids] with the Macro you created


See Google’s Data Layer Guide for additional information.

 

*The value for 'Data Layer Variable Name' is set to 'value' when the following code on your website is executed:  dataLayer.push({'Data Layer Variable Name': 'value'}. Please consult your engineer or dev team to create the Data Layer.

Have more questions? Submit a request