How to audit your Web Analytics Ecommerce tracking

Most companies will see a discrepancy between the transaction volumes recorded via web analytics and those recorded via internal sales or financial database. This article focuses on how to find and reduce that discrepancy, to give greater credibility to your web analytics data. Following on from our article on common Google Analytics setup problems, we are often asked why Google Analytics ecommerce tracking is not a 100% match with other records, and what is an acceptable level of difference. Inspired by a talk from Richard Pickett at Ensighten, here is a checklist to run through to reduce the sources of mismatch. The focus here is Google Analytics Ecommerce tracking, but it could apply to other systems. In summary, you wouldn’t ever expect there to be a 1:1 match, due to the different paths the two events take over the internet. The general consensus is that anything less than 4% of difference in transaction volumes is good, but could sometimes persist up to 10%. Factors that affect this target rate include how many users have got ad blockers or disable Google Analytics (popular in Germany, for example), what proportion are on mobile devices (which suffer from more network interruptions) and how the purchase thank you / confirmation page is built. So on to the list. 1. Are other Javascript errors on the page blocking the ecommerce event in certain situations? The most common reason for the tracking script not executing in the browser is that another bug on your page has blocked it (see GDS research). The bug may only be affecting certain older browsers (like Internet Explorer 7), and have missed your own QA process, so the best approach is to use Google Tag Manager to listen for any Javascript error events on the confirmation page and send these to Google Analytics as custom events. That way your users do the testing for you, and you can drill into exactly which browsers and versions the bugs are affecting. 2. Is the tracking code as far up the page as it could be? If the user drops their internet connection before the whole page loads then the ecommerce event data won’t get a chance to fire. The best approach is to load the script at the bottom of the <head> element or top of the <body>.  The Google Analytics script itself won't block the page load, and arguably in this one purchase confirmation page, the tracking is more important than the user experience. 3. Is the tracking code firing before all the page data has loaded? The inverse of the previous problem: you may need to delay firing the tracking code until the data is ready. This is particularly an issue if your ecommerce transaction data is ‘scraped’ from the HTML elements via Google Tag Manager. If the page elements in question have not loaded before the ecommerce tracking script runs, then the product names, SKUs and prices will be empty – or returning an error. 4. Is the problem only your ecommerce tracking script or just page tracking is general? It could be that the way you are sending the transaction data (e.g. product name, price, quantity) is the problem, or that the page tracking overall is failing in some cases. You can pinpoint where the problem lies by comparing the pageviews of the confirmation page, with the number of ecommerce events tracked. Caveat: on many sites, there’s another route to seeing the purchase confirmation page, which doesn’t involve purchasing (for example as a receipt of a historic purchase). In that case, you may need to capture a unique purchase event, which only fires when a new purchase is confirmed – but without any information on the transaction or products. 5. Are events from your test site excluded? Most companies will have a development, staging or user acceptance testing server to where the website is tested, and test users can purchase.  Are you blocking the tracking from these test sites? Some possible ways to block the test site(s) would be: Set up sub-domain specific blocking rules in Google Tag Manager (or better) Divert the tracking from your test subdomains to a test Google Analytics account, using a lookup macro/variable Set up filters in the Google Analytics view to exclude 6. Is your tag set with a high priority? Tag manager only. If you use Google Tag Manager and have multiple tags firing on the tracking page it’s possible that other tags are blocking your ecommerce data tag from firing. Under ‘Advanced settings’ in the tag editor, you can set a higher priority number for tag firing; I assume the ecommerce data to Google Analytics is always the first priority. 7. Are any strings in the product name properly escaped? A common problem is apostrophes: if your product name contains a quote mark character, then it will break the following Javascript. See Pete’s bunnies – the strings in yellow are valid, and everything after the stray apostrophe will be misinterpreted. The solution is to run a script across any text field to either strip out the quotation marks or replace any quotes with their HTML equivalent (eg &quot;). 8. Are your quantities all integers? One of our clients was selling time slots, and so had the ‘quantity’ of the ecommerce tracking data equivalent to a number of hours. Timeslots sold in half-hours (e.g. 1.5 hours) were not tracking… because Google Analytics only recognises a quantity which is a whole number, so sending ‘1.05’ will not be recognised as 1. 9. Are any possible ‘undefined’ values handled? It may be that the data on your products is incomplete, and some products that people buy do not have a name, price or SKU. The safest approach is to have some fall-back values in your Javascript tracking code to look for undefined or non-text variables and post a default value to Google Analytics. E.g. If ‘product name’ is undefined then post ‘No product name’, or for price, the default should be ‘0.00’. These will then clearly show up in your Ecommerce Product performance reports and the data can be cleaned up. 10. Are users reloading the page and firing duplicate tracking events? Check whether this is a problem for your site by using our duplicate transactions custom report to see multiple events with the same transaction ID. A solution is to set a ‘has tracked’ cookie after the ecommerce tracking has been sent the first time, and then check whether the cookie is set before sending again. 11. Are users going back to the page and firing the tracking at a later date? The sessions column in the transactionID report in step 9 should give you an idea of whether the problem is repeat page loads in one session, or users revisiting the page in another session. If you see duplicate transaction IDs appearing in other sessions there are a couple of possibilities to investigate: Could users be seeing the page again by clicking on a link to an email, or from a list of historic orders? Are there any back-end admin pages that might link to the confirmation page as a receipt? In both cases, the solution is to have a different URL for the receipt that the one where the ecommerce tracking is fired. If there are any other troubleshooting steps you have found helpful, please let us know in the comments or get in touch!  

2015-03-17

5 common Google Analytics setup problems

Can you rely on the data you are seeing in Google Analytics? If you use it daily in your business you should really give some time to auditing how the data is captured, and what glitches could be lurking unseen. The notifications feature in Google Analytics now alerts you to some common setup problems, but there are more simple ones you could check today. Here are 5 aspects of your Google Analytics account to check now. Are you running the latest Universal Analytics tracking code? Is your overall bounce rate below 10%? Are you getting referrals from your own website? Are you getting ‘referrals’ from your payment gateway? Have you got the correct website default URL set in GA? Are you getting full referring URL in reports? 1. Are you running the latest Universal Analytics tracking code? You may have clicked upgrade in the Google Analytics admin console, but have your developers successfully transferred over to the new tracker code? Use our handy tool to test for universal analytics (make sure you copy your URL as it appears in the browser bar). 2. Is your overall bounce rate below 10%? The 'bounce rate' is defined as sessions of only one page. It’s highly unlikely to be in single digits unless you have a very unique source of engaged traffic. However, it is possible that the tracking code is firing twice on a single page. This double counting would mean Google Analytics sees every single page view as two pages – i.e. not a bounce This is more common on template-driven sites like Wordpress or Joomla, where you may have one tracking script loaded by a plugin – and another pasted onto the main template page. You can check if you have multiple pageviews firing by using the Google Tag Assistant plugin for Chrome. 3. Are you getting referrals from your own website? A self-referral is traffic coming from your own domain – so if you are www.acme.com, then a self-referrals would be appearing as ‘acme.com’. Have a look at the (recently moved) referrals list and see if that is happening for you. This is usually caused by having pages on your website which are missing the GA tracking code, or have it misconfigured. You can see exactly which pages are causing the problem by clicking on your domain name in the list and seeing the referring path. If you are on universal analytics (please use our tool to check) you can exclude these referrals in one step with the Referral Exclusion list.  For a fuller explanation, see the self-referral guide provided by Google. 4. Are you getting ‘referrals’ from your payment gateway? Similar to point 3: if you have a 3rd party payment service where customers enter their payment details, after they redirect to your site – if you are on Universal analytics – they will show up as a new visit… but originating from ‘paypal.com’ or ‘worldpay.com’. You need to add any payment gateway or similar 3rd party services to that referral exclusion list.  Just add the domain name - so PayPal would be 'paypal.com' 5. Have you got the correct website default URL set in GA? When Google Analytics was first set up for your website you may have set a different domain name than what you now use. Or maybe you have switched to run your site on https:// rather than http://. So you need to change the default URL as set up in the admin page. For this go to Admin > Property > Property Settings. Once that is setup correctly, the ‘All Pages’ report becomes a lot more useful – because you can click through to view the actual page using the open link icon. Advanced: Are you getting full referring URL in reports? If you run your website across different subdomains (e.g. blog.littledata.co.uk and www.littledata.co.uk) then it can be difficult to tell which subdomain the page was on. The solution to this is to add the hostname to the URL using a custom filter. See the guide on how to view full page URLs in reports. What other setup issues are you experiencing? Let us know in the comments or by tweeting @LittledataUK.

2015-02-18

6 helpful Google Analytics guides

I've been improving my knowledge of Google Analytics this month but found that documentation provided by Google and other heavy research can be difficult to absorb. So here are 6 guides and tools that I found useful in the last month. How to set up campaign tracking Expertise level: Newbie Social media analytics: How to track your marketing campaigns by Cory Rosenfield. When you run an ad, email or social promotion, you want to see which channel is most effective in acquiring visitors. By gathering this information through tracking your campaigns you will be able to focus on winning strategies and make adjustments to less performing ones. Cory’s how to guide takes you through the basics of how to set up campaign tracking with relevant explanations and practical examples. It’s as easy as it gets. What metadata needs fixing Expertise level: Beginner Introducing the Meta and Rich Snippet Tester by Bill Sebald. This tester from RankTank compares your site’s meta and rich snippet data to what you have in your site’s code. You will be able to see mismatches between how you have set your titles and descriptions against what is actually displayed in search results. Want to make sure rich snippets are working correctly or Google doesn’t replace missing meta tags with something unsuitable? Then this tool is for you. How to do keyword research effectively Expertise level: Intermediate Keyword research in 90 minutes by Jeremy Gottlieb. Keyword research for improved content targeting can take a lot of time but it doesn’t have to. Jeremy’s plan splits it into a 4-stage process, full of handy tips on how to spend your time effectively. Especially useful for when planning topics for your blog posts and finding words that are most relevant to include in your product descriptions. Setting up alerts for site errors Expertise level: Intermediate Google Analytics custom alerts which you must always use by Himanshu Sharma. How can you find errors and problems on your website with minimum manual labour? Set up custom alerts in your Google Analytics account with Himanshu's guide. You can create notifications for tracking and shopping cart issues, and any unusual changes in your bounce rate and traffic. How to improve multiscreen experience Expertise level: Advanced Enabling multiscreen tracking with Google Analytics by James Rosewell. This step by step guide by James shows how to get better data on the use of your site across various mobile devices. You will be able to make informed decisions on optimising your site whilst taking into consideration screen sizes and layouts. This means improved experience for customers on bigger smartphones and smaller tablets. Source: Infinium.co What were the different variables again? Expertise level: Advanced Variable guide for Google Tag Manager by Simo Ahava. Variables in Google Tag Manager can be powerful, once you get to grips with them. Simo's comprehensive guide is a useful reference that covers everything you need to know from technical details to set ups and debugging. Source: SimoAhava.com Need some help with Google Analytics? Get in touch with our experts!

2015-01-30

Try the top-rated Google Analytics app for Shopify stores

Get a 30-day free trial of Littledata for Google Analytics or Segment