Creating a Convert Goal from a GTM Data Layer event

Issue Explanation

Sometimes we may have already tracked conversions through GTM using dataLayer events, and we would like to use these conversion events to create conversion goals in Convert.

Instructions

We can do this by implementing a GTM tag with a Convert JavaScript Triggered Goal code that would be used to trigger the GTM dataLayer event that we want to track.

First, let say that an event called TestAction is being pushed into the dataLayer in the following way:

window.dataLayer = window.dataLayer || []
window.dataLayer.push({
event: 'TestAction'
});

  1. Create the Convert Javascript Triggered Goal:

    Open your experiment on the Experience Summary and click on the Goal Editor to open it. Access the Goal Templates:

    mceclip0.png

    Select the JavaScript Triggered Goal Template:

    mceclip1.png

    Name your new goal and save it. Open your newly-created goal. Select and copy the JavaScript code from the goal and paste it somewhere to later create your GTM Tag.

    mceclip0.png

  2. Go to your Google Tag Manager account at https://tagmanager.google.com/ and select the account you are going to work on.

    Click on the "ADD A NEW TAG" button:


    save image

    Click on the "Choose a tag type to begin setup":

    save image

    Scroll down and select the "Custom HTML" option.

    save image

    Paste the code from the Convert JavaScript Triggered Goal into the HTML Section and name your tag:

    save image

    When the following dialog opens, select the "ADD TRIGGER" option:

    save image

    A list of possible triggers should appear.  Click on the "+" icon on the upper left, and select the trigger type:

    save image

    Scroll down and select the "Custom Event" option:

    save image

    Re-save your whole Tag, and you are done.
  3. Test your goal by triggering the GTM dataLayer event, and see if the goal is triggered in your experiment. You can also access Goals by clicking on Goals in the top tab next to Experiences.
    mceclip3.png
Need assistance? Start a conversation with our Support Team.
CONVERT MORE

Reliably Convert More Site Visitors, Even If Everything Else is Changing in Your Business.

START 15-DAY FREE TRIAL
✓ No Credit Card  ✓ Easy Set-Up  ✓ Access All Features

Comments