To implement Google Tag Manager on your Knak Landing Page:
Copy the following JavaScript and paste it as close to the opening <head>
tag as possible on every page of your website, replacing GTM-XXXX with your container ID:
<!-- Google Tag Manager --><script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-XXXX');</script><!-- End Google Tag Manager -->
Paste this code into the Tracking Header under Advanced Settings in your landing page. Need help finding your Advanced Settings? Check out this short video:
You can also add this at the brand level so that this code will apply to all of your landing pages in that brand.
Navigate to Admin > Brands > Select and edit brand > Page Settings then paste in your code. If you want this code to apply to all landing pages (including previously created landing pages) you can do so by applying a lock, this will ensure that this code applies to your landing page as soon as you open the landing page and will also make sure users cannot edit this code in their landing pages. From here you can sync/resync the page to your MAP to apply this to your live landing pages. If you only want the code to apply to newly created landing pages and allow your users to make edits to this code from their landing pages, make sure to leave this code unlocked on the admin side of the platform.
Copy the following code, replacing GTM-XXXX with your container ID:
<!-- Google Tag Manager (noscript) --><noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-XXXX"height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript><!-- End Google Tag Manager (noscript) -->
Add a HTML content block to the top of your landing page and paste the code into the custom HTML area. Make sure you replace the GTM-XXXX with your own container ID.
The noscript tag is that it will ensure the user will be tracked even if the user has disabled scripts in their browser of if the browser doesn't support script. This is the reason why there are script and noscript tags in 2 different places.
Your landing page is now set for GTM tracking.
Need more help? Contact support via live chat within Knak using the chat bubble in the bottom right corner or email support@knak.com