With this method, you can add pixels in the form of postback directly on the code or via GTM, this will help you track more accurately when some browser doesn't support third-party cookies.
You need to make sure of the checklist below to ensure this setup works.
- Setting up campaign URL and make sure passing Trackier click Id in the landing page URL
- Add Script mentioned below on all Landing pages.
- Placing Conversion pixel on respective Thank you pages.
Step 1
Add your landing page URL and pass the trackier click id as suggested below and utm_campaign parameter as suggested.
https://www.yourwebsite.com/?utm_campaign=trackier_{camp_id}&click_id={click_id}
Steps 2
Now you need to add the below script on all Landing pages, this script will make sure we get the session id or click id even when the browser or device doesn't support third-party cookies.
<script src="https://static-cdn.trackier.com/js/trackier-lp-v1.1.0.js"></script>
Step 3
Now you need to define on which page Pixel needs to be added and get that pixel from the platform, you need to make sure to get your Domain and Security Token from your Trackier panel inside the particular campaign.
This will go in <body> Tag
iFrame Pixel
// Trackier Integration Code for Thank You Page <script> (function () { function getCookieVal(name) { var allCookies = document.cookie.split('; '); var result = null; allCookies.forEach(function (v) { if (v.indexOf(name + '=') !== -1) { result = v.split('=')[1]; return false; } }) return result; } var clickId = getCookieVal('click_id') || ''; var tr_utm_camp = getCookieVal('tr_utm_camp') || ''; if (/^trackier_/.test(tr_utm_camp)) { var a=document.createElement("iframe"); a.setAttribute("src","UPDATE_THE_URL_HERE&txn_id=PLEASE_UPDATE_THE_TXN_ID_HERE&sale_amount=PLEASE_UPDATE_THE_SALE_AMOUNT_HERE¤cy=INR&click_id="+clickId); a.style.width="1";a.style.height="1"; document.body.appendChild(a) } }()) </script>
// // Trackier Integration Code for Thank You Page <script> (function () { function getCookieVal(name) { var allCookies = document.cookie.split('; '); var result = null; allCookies.forEach(function (v) { if (v.indexOf(name + '=') !== -1) { result = v.split('=')[1]; return false; } }) return result; } var clickId = getCookieVal('click_id') || ''; var tr_utm_camp = getCookieVal('tr_utm_camp') || ''; if (/^trackier_/.test(tr_utm_camp)) { var a=new Image(); a.src = "UPDATE_THE_URL_HERE&txn_id=PLEASE_UPDATE_THE_TXN_ID_HERE&sale_amount=PLEASE_UPDATE_THE_SALE_AMOUNT_HERE¤cy=INR&click_id="+clickId; a.style.width="1";a.style.height="1"; document.body.appendChild(a) } }()) </script>
Open the tag manager and find the tags which are integrated with the website, open the tag >> configuration >> and inside the triggers, under custom HTML you can place the pixel associated with <head> Tag and <body> Tag.
Marked part in the script you will get from the panel, you can connect with support to know more, below we have added more information how you can get it by yourself.
- txn_id - Pass your order id
- sale_amount - Pass sale amount in this parameter
- user_id - pass user id of the user.