Create a goal conversion from GTM

Written by Julie Trenque

Updated on 09/05/2024

2 min

Intermediate

Was this content useful?

This guide will walk you through the steps to create a goal conversion tag in Google Tag Manager (GTM) for Kameleoon. You’ll learn how to configure a custom HTML tag to track specific events, such as adding to cart or completing a transaction. Additionally, you’ll find instructions for setting up a tag with revenue tracking.

Create a tag

  1. Click on New
  2. Name you tag. Examples: “Kameleoon – add to cart”, “Kameleoon – transaction”
  3. In Tag configuration, select “Custom HTML” and insert this code:
   kameleoonGoal = 123456;   window.kameleoonQueue = window.kameleoonQueue || [];   kameleoonQueue.push(['Goals.processConversion', kameleoonGoal]); 

You need to replace 123456 by the Kameleoon ID.

  1. Add a trigger: select an existing trigger in the list or create a new one (depending on the dataLayer format).

Create a tag with revenue

To create a tag with revenue, in step 3 of creating the tag, enter this code:

   kameleoonGoal = 123456;   window.kameleoonQueue = window.kameleoonQueue || [];   kameleoonQueue.push(['Goals.processConversion', kameleoonGoal, {{TransactionRevenue}}]); 

123456 is the Kameleoon ID and {{TransactionRevenue}} is a variable with the revenue attached to the conversion.

  • In this article :