Create a goal conversion from GTM
This article will help you create a goal conversion tag for Kameleoon using Google Tag Manager (GTM). You will learn how to set up a custom HTML tag to monitor specific events and how to configure a tag that tracks revenue.
Create a tag
- Click New.
- Name your tag (for example, "Kameleoon - add to cart", "Kameleoon - transaction").
- Select Custom HTML in Tag Configuration, and insert this code:
kameleoonGoal = 123456; window.kameleoonQueue =
window.kameleoonQueue || [];
kameleoonQueue.push(['Goals.processConversion',
kameleoonGoal]);
- You must replace
123456
with the Kameleoon goal ID.
- Select an existing trigger or create a new one (depending on the
dataLayer
format).
Create a tag with revenue
To create a tag with revenue:
- Click New.
- Name your tag.
- Select Custom HTML in Tag Configuration, and insert this code:
kameleoonGoal = 123456; window.kameleoonQueue =
window.kameleoonQueue || [];
kameleoonQueue.push(['Goals.processConversion',
kameleoonGoal,{{TransactionRevenue}}]);
123456
is the Kameleoon goal ID, and {{TransactionRevenue}}
is a variable with revenue attached to the conversion.