Creating a Convert Goal from a GTM Data Layer event

Issue Explanation

It occurs that sometimes we may have already track conversions with through GTM using dataLayer events.

It is there logical that we would like to use this conversion events  built on our site, to also register conversion goals in Convert.


We can do this by implementing a GTM tag with a Convert Javascript Triggered Goal code that would be use as 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 || []
event: 'TestAction'

  1. Create the Convert Javascript Triggered Goal:

    First go to Convert. Open your experiment on the Experience Overview and click on the goal editor to open it.

    save image

    Then open the Goal Templates.

    save image

    Then select the Custom Js Goal Template.

    save image

    Name your new goal and save it.


    Open your just created goal.

    save image

    Select and copy the javascript code corresponding to the goal and keep it somewhere to later create your GTM Tag.

    save image

  2. First go to your Google Tag Manager account at and select the account you are going to work on.

    Then click on the "ADD A NEW TAG" button, as in the following image:

    save image

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

    save image

    Scroll down and select the "Custom HTML Tag" option.

    save image

    Then paste the code for Convert Javascript Triggered Goal on the HTML Section and name your tag.

    save image

    Then the following dialog opens, select the "ADD TRIGGER" option.

    save image

    Then a list of possible triggers appears there, but click on the "+" icon on the upper leftn, then you need to 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.

    Test your goal by triggering the GTM dataLayer event, and see if the goal is triggered in your experiment.

    Also you can go into the Goals screen by clicking on goals in the menu.

    save image
Have more questions? Submit a request