Optivo Pixel Implementation – Google Tag Manager

Purpose

If your site already has Google Tag Manager installed, you can install the Optivo library to it.

What you’ll need

  • Access to Google Tag Manager which is already enabled on your website
  • A list of your conversion page(s) where a lead completes an action that would result in a conversion for the campaign. For example, a checkout success page.

Installation Steps

  1. Log in to your Google Tag Manager account and navigate to the desired container.
  2. Click on “Tags” in the left sidebar and then click on “New” to create a new tag.
  3. Name your tag (e.g., “Optivo Tracker”) and click on “Tag Configuration”.
  4. Choose “Custom HTML” as the tag type.
  5. Copy the following code snippet and paste it into the HTML text box:
<script type="text/javascript">

    var optivoScript = document.createElement('script');
    optivoScript.src = "https://id.optivo.digital/id.v1.min.js";
    optivoScript.defer = true;

    optivoScript.onload = function () {
        var config = {
            //conversionPages: ['/checkout/success'] - optionally set a checkout success conversion page
        };

        window._OPTIVO.init(config);
    };

    document.head.appendChild(optivoScript);

</script>
 
  1. Important – In advanced settings, under ‘consent settings’, do NOT set the tag to fire on any consent requirements. Leave as default ‘Not set’. Our tag is setup to process data in accordance with our consent process.
  2. Click on “Triggering” and set up the trigger for the pages where you want the tag to fire.
  3. Click “Save” to save your new tag.
  4. Click “Submit” in the upper right corner to publish the changes.
  5. Next, you likely need to create a separate tag to add the checkout success tracking, and use a custom trigger that is used on your checkout success page. Add the following:
<script type="text/javascript">
    var optivoScript = document.createElement('script');
    optivoScript.src = "https://id.optivo.digital/id.v1.min.js";
    optivoScript.defer = true;

    optivoScript.onload = function () {
        window._OPTIVO.init().then(function () {
            window._OPTIVO.conversion();
        });
    };

    document.head.appendChild(optivoScript);
</script>
 

Verifying Installation

Once you have added the modified code snippet to your website and deployed the changes, it would be a good idea to visit the pages it has been enabled on.

Go to a page you have the tracking enabled on, then inspect the browser console window (F12 in Chrome) and look for a line output that should read the following:

[OPTIVO]: Active on this page.