Overview
Kayzen facilitates advertisers who are using Google Tag Manager (GTM) for their website to run campaigns and track any custom events in the Kayzen platform. With this document, you will be able to understand the configurations and settings you need to implement to run campaigns on Kayzen using GTM.
Example:
An advertiser who is advertising their Car Showroom website wants to track the number of people who have requested a Demo Ride on their website. Advertiser will run campaigns on Kayzen and any ads which have triggered “Demo Ride” on the website will be tracked in Kayzen.
Google Tag Manager settings
You will need to implement the following settings in your GTM for your website where you want to track the events. You need to implement all these below settings for every event you want to measure in Kayzen.
To track events for an action on the Website
Example: Request for a demo, Add to Cart, Purchase.
Create two new Variables:
Variable Name: QS KayzenBidID
Variable Type: URL
Component Type: Query
Query Key: bid_id
Variable Name: KayzenBidID
Variable Type: 1st party Cookie
Cookie Name: KayzenBidID
Convert undefined to: {{QS KayzenBidID}}
Create a new Trigger:
Trigger Name: Click on the button
Trigger Type: Click - All Elements
This trigger fires on: Some Clicks
Click Element matches CSS selector <#the-button>
Create two new Tags:
Tag Name: Kayzen event Postback
Tag Type: Custom Image
Image URL: https://api-events.kayzen.io/v1/ev?tp=direct&api_key=<api_key>&app_event=<event_name>&can_claim=1&bid_id={{KayzenBidID}}
Enable Cache Busting
Triggering: choose the new trigger you created “Click on the button”
Tag Name: Store Bid ID
Tag Type: Custom HTML
Code: <script> document.cookie = 'KayzenBidID={{QS KayzenBidID}}'; </script>
Triggering: Add new Trigger Name “Store Kayzen Variable”
Trigger Configurations: Page View
This trigger fires on: Some Views
QS KayzenBidID does not equal undefined
To track visits on the Website
Create a new Variable:
Variable Name: QS KayzenBidID
Variable Type: URL
Component Type: Query
Query Key: bid_id
Create a new Trigger
Trigger Type: Page View
This trigger fires on: Some page views
QS KayzenBidID does not equal undefined
Trigger Name: Page Visit
Create a new Tag
Tag Name: Kayzen Event Postback
Tag Type: Custom Image
Enable Cache Busting
Triggering: choose the new trigger you created “Page visit"
Kayzen click URL:
Click URL should have a mandatory Kayzen macro &bid_id={CONVERSION_ID} (if you want to track other details on Kayzen, you can refer to macro tracking article).
Sample click URL: https://kayzen.io/?utm_source=Kayzen&utm_medium=display&utm_campaign=Test&bid_id={CONVERSION_ID}
☝️ bid_id in Variable creation and image URL under Tag creation in GTM and the click URL bid_id you use in Kayzen should all be of the same format.
💡 Other related articles you can refer to how to get API key