How To Add Google Analytics Tracking Code To Kartra Using Google Tag Manager

How To Add Google Analytics Tracking Code To Kartra Using Google Tag Manager

Note: At the time of writing this in April 2020, there is no active integration for Google Analytics or GTM. This may have changed since publication. If not, the solution in this article works a treat!

If you (or your client) has moved to Kartra for its all-in-one marketing and membership solution, and like me, you want to figure out how the heck to:

  1. install Google Analytics for customer behaviour tracking data because the standard script install isn’t working; and/or
  2. easily install tracking codes without having to go back through every page you’ve ever created each time something new comes along.

The solution you’re after is: Google Tag Manager

BUT there are a few important things to note before you get carried away with the install.

Install Google Tag Manager*

Step 1: Create a free Google Tag Manager account (or login to an existing one)

Step 2: Get the GTM install scripts from the Admin > Install Google Tag Manager tab.

They will look like:

Paste this code as high in the <head> of the page

<!– 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-XXXXXXX’);</script>
<!– End Google Tag Manager –>

Paste this code immediately after the opening <body> tag

<!– Google Tag Manager (noscript) –>
<noscript><iframe src=”https://www.googletagmanager.com/ns.html?id=GTM-XXXXXXX”
height=”0″ width=”0″ style=”display:none;visibility:hidden”></iframe></noscript>
<!– End Google Tag Manager (noscript) –>

Step 3: Login to Kartra and go to My Pages

Step 4: Open one of your pages by hovering over the page and clicking the 3 dots and clicking Edit (or create a new page)

Step 5: Click Settings on the left menu and then Tracking Code

Kartra Settings Tracking Code

Step 6: Paste in the Google Tag Manager scripts as instructed by GTM

*BUT remove the <script> and </script> from the code snippet pasted into the head section

Add Google Tag Manager to Kartra

Step 7: Apply Changes, Publish/Save page.

Step 8: Repeat process for all other Kartra pages you want to add tracking codes to.

Adding Google Analytics Page View Tracking To Kartra via Google Tag Manager

If you use Kartra in collaboration with advertising or another website/s, I believe it’s useful to have Google Analytics tracking installed so that you can track the effectiveness of your marketing channels, and the behaviour of customers through your funnel.

Yes Kartra does include tracking and analytics however not a great deal, and definitely not enough to tell you even the basics such as where your customers are coming from and through what channels (i.e. Facebook, blog, an affiliate).

Installing the standard Google Analytics tracking code into Kartra pages doesn’t really work that well, if at all. The only way I could get it to work is through Google Tag Manager. Plus if you have other code snippets to install Google Tag Manager saves you a bunch of time with installation (and removal).

If you already have a workspace for your GTM code snippets for Google Analytics page views active on your website, that should work just fine as is. If not follow these steps:

Step 9: Open Google Tag Manager and Create A Workspace

Step 10: Add A New Tag

Step 11: Give the Tag a title

Step 12: Click Tag Configuration and select Google Analytics Universal

Step 13: Set Track Type to “Page View

Step 14: In the Google Analytics Settings field, click ‘Add New Variable‘ and follow the prompts to connect your Google Analytics account.

Step 15: Select “Triggering” and choose “All Pages

Google Tag Manager Google Analytics Page View Tag

Step 16: Save Tag (blue button top right)

Step 17: Check the Variables tab to ensure these default variables are showing:

Google Tag Manager Kartra Google Analytics Install

Step 18: Click “Submit” big blue button at the top right, then “Publish“.

Step 19: To check that Google Analytics page view tracking is firing correctly on your Kartra pages, in Google Tag Manager go to Workspace and select the “Preview” button top right.

Step 20: Open a Kartra page link that you’ve installed the GTM code on already. A Google Tag Manager debug window should open at the bottom of the page showing you which tags fired/didn’t fire.

If it isn’t working – check your Google Tag Manager script on the Kartra page doesn’t include the <script> </script> in the code snippet as mentioned above in red.

If it is working – open your Google Analytics account and go to the “Real Time > Content” window, open the Kartra page in another window, see if the Real Time data shows the Kartra page link you’re looking at.

NOTE: If you can’t see any  Real Time traffic data on your Kartra pages but the GTM tags are firing correctly, go to Google Analytics > Admin > View Settings. Turn off any Google Analytics filters for ghost spam that may be hiding Kartra traffic from your data. Test again.

Adding Other Tracking Codes

Going forward (if you ensure that the Google Tag Manager code snippets are installed on all of your Kartra pages) anytime you need to add a snippet of code you can easily do that using Google Tag Manager.

For example with just a few clicks you can use Google Tag Manager to add any other tracking you need such as:

  • Facebook Pixel
  • Pinterest Pixel
  • Google Optimize

And instead of editing every page in Kartra to add the code snippet, you can just add it once in Google Tag Manager and it’s instantly applied to all of your Kartra pages. #winning

 

This solution to add Google Analytics tracking to Kartra pages took me hours of searching and testing to find the answer so hopefully you found this article quickly and it was easy to implement. Drop me a comment below if you found this helpful 🙂

 

P.S. Once you’ve installed Google Analytics into your Kartra pages you can tap into key marketing performance indicators that will help you optimise and scale your digital marketing efforts going forward. Get started with our Top 10 Performance Metrics To Monitor In Google Analytics.

====

Want to try Kartra for yourself? Register for a 14 day trial here (affiliate link).

Add a Comment

Your email address will not be published. Required fields are marked *