Introduction
This is a guide to implementing pixel tracking for analytics and remarketing tools like Google Analytics, Meta and TikTok. Although it is possible to gather some user data without, we recommend using Google Tag Manager to populate revenue and purchase data in these applications. Before following the steps outlined below, you will need to have created an account in Google Analytics, Meta or TikTok and Google Tag Manager.
Google Analytics 4
To begin, you will add your Google Analytics 4 measurement ID and Tag Manager code snippets for each webpage in the purchase flow. To find your measurement ID please visit this Analytics Help page.
In Nliven, enter your measurement ID in the Google Analytics 4 ID field in Account Settings > General > Web Settings
Google Tag Manager
Next, you will add code snippets from your Google Tag Manager web container which will parse data to Google Analytics. To locate the code which includes your unique Container ID, please visit this Tag Manager Help page
Enter your web container code snippets to the Global Head HTML and Global Body HTML fields in Account Settings > General > Web Settings.
In order to track revenue and purchase data at specific stages in the purchase flow, you will need to create an Event Tag with Triggers and Event Parameters in Tag Manager.
For instructions on creating a GA4 Event Tag in Tag Manager please visit this Tag Manager Help page.
Create Triggers to match the ecommerce Event names using Analytics recommended events.
The following events are available in the Nliven booking journey:
For a list of available event and item parameters at each event, click on the above links.Those parameters which are required for ecommerce tracking are marked accordingly. You can create Data Layer Variables and Custom JavaScript variables to map elements of the Data Layer to Event Parameters using the GA4 Event Tag Event Parameters or Event Settings Variable.
Tag Assistant is a Chrome browser extension which will help verify and troubleshoot your configuration. It can be activated from Tag Manager by selecting in the top right or from Chrome browser’s Extensions list. Tag Assistant will display the events triggered at each stage of the purchase flow and by selecting an event, you can view the automatically collected parameters and the event parameters you have created.
Resources
Show Specific Tracking
If it is necessary to limit tracking to a specific show, you can instead add scripts to an Event Template. The same fields for Global Head Scripts and Global Body Scripts are located in an Event Template at Settings > Options.
Meta Pixel Tracking
To track page views in Meta on the consumer pages of Nliven enter the code below in the Global Head HTML field in Account Settings > General > Web Settings replacing YOURMETAPIXELID with your unique Meta pixel ID.
<!-- Meta Pixel Code -->
<script>
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window, document,'script',
'https://connect.facebook.net/en_US/fbevents.js');
fbq('init', 'YOURMETAPIXELID');
fbq('track', 'PageView');
</script>
<!-- End Meta Pixel Code -->
Meta Pixel Helper is a Chrome browser extension which will help verify and troubleshoot your configuration. Once downloaded it can be accessed from the Extension list in your Chrome browser.
Resources
TikTok Pixel Tracking
To track page views in TikTok on the consumer pages of Nliven enter the code below in the Global Head HTML field in Account Settings > General > Web Settings replacing YOURTIKTOKPIXELID with your unique TikTok pixel ID.
<!--TikTok Pixel Code-->
<script>
!function (w, d, t) {
w.TiktokAnalyticsObject=t;var ttq=w[t]=w[t]||[];ttq.methods=["page","track","identify","instances","debug","on","off","once","ready","alias","group","enableCookie","disableCookie"],ttq.setAndDefer=function(t,e){t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}};for(var i=0;i<ttq.methods.length;i++)ttq.setAndDefer(ttq,ttq.methods[i]);ttq.instance=function(t){for(var e=ttq._i[t]||[],n=0;n<ttq.methods.length;n++)ttq.setAndDefer(e,ttq.methods[n]);return e},ttq.load=function(e,n){var i="https://analytics.tiktok.com/i18n/pixel/events.js";ttq._i=ttq._i||{},ttq._i[e]=[],ttq._i[e]._u=i,ttq._t=ttq._t||{},ttq._t[e]=+new Date,ttq._o=ttq._o||{},ttq._o[e]=n||{};var o=document.createElement("script");o.type="text/javascript",o.async=!0,o.src=i+"?sdkid="+e+"&lib="+t;var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(o,a)};
ttq.load('YOURTIKTOKPIXELID');
ttq.page();
}(window, document, 'ttq');
</script>
<!-- End TikTok Pixel Code-->
TikTok Pixel Helper is a Chrome browser extension which will help verify and troubleshoot your configuration. Once downloaded it can be accessed from the Extension list in your Chrome browser.
Resources
Comments
0 comments
Please sign in to leave a comment.