What are Enhanced Ecommerce reports?

In May 2014 Google Analytics introduced a new feature: Enhanced Ecommerce tracking. If you run an ecommerce operation, this gets you much more detailed feedback on your checkout process. What will I see? Shopping behaviour: how are people converting from browsers to purchasers? Checkout behaviour: at what stage of your checkout do buyers abandon the process Product performance: which products are driving your sales, and which have a high return rate Real campaign returns: see your real return on marketing investment including promotional discounts and returns How do I set this up? The bad news is it definitely requires an experienced software developer for the setup. The reports require lots of extra product and customer information to be sent to Google Analytics. You can read the full developer information on what you can track, or our own simpler guide for tracking ecommerce via Tag Manager. However, if you already have standard ecommerce tracking and Google Tag Manager, we can set Enhanced reports up in a couple of days with no code changes on your live site - so no business disruption or risk of lost sales. Is it worth implementing? Imagine you could identify a drop-off stage in your checkout process where you could get a 10% improvement in sales conversion or a group of customers who were unable to buy (maybe due to language or browser difficulties) – what would that be worth? Many businesses have that kind of barrier just waiting to be discovered…   Get Social! Follow us on LinkedIn, Twitter, and Facebook and keep up-to-date with our Google Analytics insights.

2016-11-14

How to track time on page with Google Tag Manager

Our script for accurate tracking of time on page beats Google's default measurement to give you an accurate picture of how long users are spending on your page open and in focus. This post translates the approach into Google Tag Manager. The setup consists of two tags (one custom), one firing rule and two variables. Step by step: 1. Add the timer script as a custom HTML tag <script><br /> /*<br /> Logs the time on the page to dataLayer every 10 seconds<br /> (c) LittleData consulting limited 2014<br /> */<br /> (function () {<br /> var inFocus = true;<br /> var intervalSeconds = 10; //10 seconds<br /> var interval = intervalSeconds * 1000;<br /> var eventCount = 0;<br /> var maxEvents = 60; //stops after 10 minutes in focus<br /> var fnBlur = function(){inFocus = false; };<br /> var fnFocus = function(){inFocus= true; };<br /> if (window.addEventListener) {<br /> window.addEventListener ('blur',fnBlur,true);<br /> window.addEventListener ('focus',fnFocus,true);<br /> }<br /> else if (window.attachEvent) {<br /> window.attachEvent ('onblur',fnBlur);<br /> window.attachEvent ('onfocus',fnFocus);<br /> }<br /> var formatMS = function(t){<br /> return Math.floor(t/60) +':'+ (t%60==0?'00':t%60);<br /> }<br /> var timeLog = window.setInterval(function () {<br /> if (inFocus){<br /> eventCount++;<br /> var secondsInFocus = Math.round(eventCount * intervalSeconds);<br /> dataLayer.push({"event": "LittleDataTimer", "interval": interval, "intervalSeconds": intervalSeconds, "timeInFocus": formatMS(secondsInFocus) });<br /> }<br /> if (eventCount>=maxEvents) clearInterval(timeLog);<br /> }, interval);<br /> })();<br /> </script> 2. Add two variables to access the data layer variables One for the formatted time, which will feed through the event label And one for the number of seconds in focus since the last event, which will feed through the event value 3. Add the firing rule for the event 4. Add the tag that reports the timer event to Google Analytics Options and further information You can change the timer interval in the custom HTML tag - the reporting will adjust accordingly. Choosing the interval is a trade-off between the resolution of the reporting and the load on the client in sending events, as well as Google's 500 hit per session quota. We've chosen ten seconds because we think the users who are in 'wrong place' and don't engage at all will leave in under ten seconds, anything more is some measure of success. If you'd like assistance implementing this or something else to get an accurate picture of how users interact with your site, get in touch!   Get Social! Follow us on LinkedIn, Twitter, and Facebook and keep up-to-date with our Google Analytics insights.

2016-11-14

Accurate tracking of time on site

There’s a flaw in the way Google Analytics measures ‘time on site’: the counter only starts from the second page visited, so all one-page visits are counted as zero time on site. If a visitor comes to your page, stays for 10 minutes reading – and then closes the window… that’s counted as ZERO time. With landing pages that have lots of interaction, or the call to action is a phone call rather than a click, this can be a real problem. Pasting the Javascript below onto all the pages of your site will fix the problem. The script logs an event to Google Analytics for every 10 seconds the visitor stays on the page, regardless of whether they bounced or not. But it won't affect your bounce rate or time on site for historical comparison *. We suggest you look closely at how visitors drop off after 10, 20 and 30 seconds to see which of your web content could be improved. Paste this into the source of your all your pages, after the Google Analytics script <!-- Time on Site tracking (c) LittleData.co.uk 2014 --><script>(function(e){var t=true;var n=0;var r=true;var i=function(){t=false};var s=function(){t=true};if(window.addEventListener){window.addEventListener("blur",i,true);window.addEventListener("focus",s,true)}else if(window.attachEvent){window.attachEvent("onblur",i);window.attachEvent("onfocus",s)}var o=function(e){return Math.floor(e/60)+":"+(e%60==0?"00":e%60)};var u=window.setInterval(function(){e=e+10;if(t){n=n+10;if(typeof _gaq==="object"){_gaq.push(["_trackEvent","Time","Log",o(n),n,r])}else if(typeof ga==="function"){ga("send",{hitType:"event",eventCategory:"Time",eventAction:"Log",eventLabel:o(n),eventValue:10,nonInteraction:"true"})}}},1e4);window.setTimeout(function(){clearInterval(u)},601e3)})(0)</script> What you'll see In Google Analytics go to Behaviour .. Events .. Top Events and click on the event category 'Time'.                               Searching for a particular time will find all the people who have stayed at least that length of time. e.g. 0:30 finds people who have stayed more than 30 seconds. FAQs Does this affect the way I compare bounce rate or time-on-site historically? No. The script sends the timer events as 'non-interactive' meaning they won't be counted in your other metrics. Without this, you would see a sharp drop in bounce rate and an increase in time on site, as every visitor was counted as 'non-bounce' after 10 seconds. If you prefer this, see below about adapting the script. Will this work for all browsers? Yes, the functions have been tested on all major, modern browser: IE 9+, Chrome, Safari and Firefox. What if I upgrade to Universal Analytics? Don’t worry – our script already checks which of the two tracking scripts you have (ga.js or analytics.js) and sends the appropriate log. Will this max out my Google Analytics limits? The script cuts off reporting after 5 minutes, so not to violate Google’s quota of 200 – 500 events that can be sent in one session Can I adapt this myself? Sure. The full source file is here. Need more help? Get in touch with our experts!

2016-11-13

How to read the frequency report in Google Analytics

Google Analytics engagement reports can provide great insight into user behaviour on your site. However, it’s not obvious how to read them - and when you figure out how to read them, it’s not always obvious what’s good! The visitor frequency report is found under Audience > Behaviour > Frequency and recency in the Google Analytics menu. The report shows the sessions, by the number of visits for each visitor. Google’s explanation of how to read the frequency graph is nice and clear. However, their simplified example leaves out something important: returning users. In the graph, the visit count shown is for the whole user history, not just the period of the report. So if a visitor has come three times before the period their session will show in the three band. Similarly, if a user has visited the site five times in the past and then visits the site twice during the period, they will in count of sessions as 6 and 7. The example below is from a newly released site, where nearly all the visits are from the developers, who have been many times before - so there are no visitors in the 1,2,3,4 or 5 visit bands for this site in this period. The fact that the banding is based on the whole user history, not just behaviour during the period, can make the report much harder to interpret - you can't easily see the drop off in repeat visitation if an unknown number of return visitors at some point in their many visits history are also coming in. Fortunately, Google Analytic's segmentation capability comes to the rescue! For example, you can find out about the returning behaviour of visitors who came the first time during the period in question, with the segment - the settings are in the screenshot below. Note that you need to change the segment to filter users, not sessions, otherwise you will just create a more complex version of the built-in new users segment! Here’s an example of the sort of thing you might see with the segment, showing 3 segments: All Session (built in) 'User sessions = 1'  - custom segment for users having their first session in the period New Users (built in) Note: For the visit count = 1 band, the session count is the same across all three segments, For the visit count = 2 band, (and above) the number for all sessions is higher, because it includes all the users who came in on their second visit during the period. The number for the user sessions = 1 segment, is lower because it includes only the users who had their first visit during the period. The number for new users is zero because users are not new on their 2nd visit As you can see, the custom segment makes it possible to see the real return rate of new visitors in the period, narrowing to visitors who came the first time in the period in question. From this example, you can also see how misleading it would be to naively interpret the default 'all sessions' segment for, say, four sessions as the number who returned four times during the period - clearly there is a large number who have previous visits outside the period of the report. Note that none of the segments in the example actually gives the number of users who returned four times during the period - this is actually really difficult to obtain. Leaving that question aside for now, to extract some real insight from the approach of segmenting in the frequency report, combine that segment condition with a goal, say ‘transactions per user > 0’ - then you can see how many new users went on to a transaction, and how many visits they made during the period. Need help to set this up or have any questions? Get in touch with our team of experts and we'd be happy to answer any questions! This is a valuable segment to monitor and analyse - how many users have gone from first visit to a transaction this week, and how many sessions did they make along the way?

2016-11-11

Top 5 pitfalls in tracking ecommerce in Google Analytics

We all need our Google Analytics data to be correct and realistic. Ecommerce, just like any other website, needs correct data. What makes ecommerce websites more open to error is the ecommerce data capturing. We have put together a list of 5 mistakes in a Google Analytics integration that you should check before starting reporting on your online store! Top 5 pitfalls in tracking ecommerce in Google Analytics Tracking code is missing from some pages Multiple page views sent Multi- and subdomain tracking issues Wrong usage of UTM parameters Wrong usage of filters   Tracking code is missing from some pages The easy way for an established website to see if the tracking is complete is to go to Google Analytics > Acquisition > Referrals and search the report for the name of your website, as shown below. If you have a lot of pages and are not sure how to find which exact pages are missing the code, you can use the GA Checker.   Multiple page views sent The second most common issue we found is having multiple Google Analytics scripts on the same page. The easiest way to check this is with the Tag Assistant extension from chrome. Go on your website and inspect the page (see image below). You can also use the GA Checker for this. The solution is to leave only one script on the page. There are situations where you're sending data through Google Tag Manager. If you see 2 pageviews in Tag Assistant or gachecker.com, you should take a look at your tags. There should be only one for pageview tracking!   Multi- and Subdomain Tracking Issues Are you seeing sales attributed to your own website? Or your payment gateway? Then you have a cross-domain issue. And you can read all about it in our blog post: Why do you need cross-domain tracking?. You can see if this is the case by going to Acquisition > Overview > Source/Medium and find your domain name or payment provider.   Wrong usage of UTM parameters You should never tag your internal links with UTM parameters. If you do so every time a clients click's on a UTM tagged link, a new session and the original source will be overwritten. Pay attention to your campaign sources and search if something suspicious appears in the list. You'll find, you have internal links tagged when you will try to find the source of your transactions and find the name of the UTM parameters from your website instead. Read what UTM's are and why you should use them in our blog post: Why should you tag your campaigns?.   Wrong usage of filters Using filters will improve the accuracy of your data, however, data manipulated by your filters cannot be undone! To prevent your filter settings or experiments to permanently alter your traffic data you should set up separate views, and leave an unfiltered view with raw data just in case. Check your filters section and be sure you know each purpose. You can check more on this blog post: Your data is wrong from gravitatedesign.com. Need help with any of these common mistakes? Get in touch and we'd be happy to help!   Get Social! Follow us on LinkedIn, Twitter, and Facebook and keep up-to-date with our Google Analytics insights.

2016-11-01

Personalising your site for a local event with Google Optimize

Google Optimize (standard edition) will be released publically at the end of October, allowing free access to powerful AB testing and personalisation features. Here’s a guide to launching your first test, assuming you have the Google Optimize 360 snippet installed on your page. Step 1: Create the experiment I want to trigger a personalisation on Littledata’s homepage, shown only to visitors from London, which promotes a local workshop we have running later this month. It’s not a real AB test, as we won’t have enough traffic to judge whether the banner is a success, but we can use the ‘experiment’ to launch this personalisation for a local audience. First, I need a new test (click the big blue plus sign) and select an AB test. I’ll name my test, and set the editor page as our homepage – which is pre-filled from Google Analytics anyway… Since I have Google Analytics linked, I can select a goal from GA as the objective. In this case, the banner will promote the event (which isn’t tracked on our site) so the only sensible goal is promoting more pageviews – but it’s possible it will also increase signups for our app, so I’ll include that as a secondary objective. Next, I need to add a variant, which is going to load my event banner. I’ve named it ‘add yellow bar’. Clicking on the variant row will take me to the editor. Step 2: Edit the ‘B’ version Note: Optimize’s editor works as a Chrome Plugin, so you’ll need to install that in Google Chrome first. It’s easy to select an element on the page to edit or hide, but my variant will load a new snippet of HTML code which is not already on the page. So I’ll select the element at the top of the page (with ID ‘content’) and then go to the select elements icon in the top left. Now I’ve got the right element to use as a building block, I’m going to add an ‘HTML’ change. And set it to insert the HTML ‘before’ the current element. I’ve pasted in the HTML I’ve recycled from another page. Once I click apply we can see the new element previewing at the top of the page. Next, let’s check it looks OK on mobile – there’s a standard list of devices I can select from. Yes, that is looking good – but if it wasn’t I could click the ‘1 change’ text in the header to edit the code. Lastly, in the editor, you may have noticed a warning notification icon in the top right of the Optimize editor. This is warning me that, since Littledata is a single-page Javascript site, the variant may not load as expected. I’m confident Optimize is still going to work fine in this case. Step 3: Launching the experiment After clicking ‘Done’ on the editor, I go back to the experiment setup. Usually, we’d split the traffic 50:50 between the original and the variant, but in this case, I want to make sure all visitors from London see the message. I’ll click on the weighting number, and then set ‘add yellow bar’ to show 99.9% of the time (I can’t make it 100%). Then, we want to set the geotargeting. The experiment is already limited to the homepage, and now I click ‘and’ to add a 2nd rule and then select ‘geo’ from the list of rules. I want the yellow bar to show only for visitors from London. The city is a standard category, and it recognised London in the autocomplete. As the final step, I need to click ‘Start Experiment’. I can’t edit the rules of any running experiments (as this would mess up the reporting), but I can stop and then copy an experiment which is incorrect. Conclusion Google Optimize makes it really simple to set up tests and personalisations, although it is missing a few features such as scheduling. The premium edition (Optimize 360) will allow more analysis of tests using Google Analytics, and also allow the import of custom audiences from other Google 360 products. This is powerful if you want to launch a customised landing pages experience based on, say, a DoubleClick display ad campaign. So try it out, and if you have any questions, contact one of our experts! Get Social! Follow us on LinkedIn, Twitter, and Facebook and keep up-to-date with our Google Analytics insights.

2016-10-18

How to track forms which don't redirect to a thank you page

Many contact forms now use Javascript to submit and do not redirect to a new page. So to track the form, unless you trigger an event on the submit button, you need to listen for a piece of text (usually saying thank you). We have created a custom HTML script that listens to the changes in the page and triggers an event called 'formSubmitted'. This event can then be used to fire a separate tag with event details to Google Analytics. We've tested this on our contact form at Littledata and here's how you can set it up too. Step 1 The first step is to go through the contact form and see what the steps are in completing it. On ours, you just enter the information in the fields and press "SUBMIT MESSAGE". When the message is sent out, the button will say "SENT!". Here the only thing that changed was the text on the button from 'submit message' to 'sent'. We built this HTML script that listens to the changes on the page, but you'll need to change line 10 to be whatever the message is in your form. You will also need to change line 15 if you have multiple forms on the page. [code lang="js"] &lt;script&gt; // **** Littledata Javascript form tracker **** // Generates a GTM custom event called 'formSubmitted' // When an on-page form is submitted // CHANGE the text to match the message displayed // when the form is successfully completed // It is not case sensitive var text = "sent!" // By default it will search for text within the first form // Set to false if text is outside a form // or change to a higher false if there are multiple forms var formIndex = 0; // OPTIONALLY, restrict the search to an HTML element ID // If you leave this blank, the whole page will be searched; // this causes the script to run more slowly var targetId = "" // **** No changes needed to the script below **** text = text.toLowerCase() dataLayer = dataLayer || []; if (!formIndex &amp;&amp; targetId.length == 0) console.error('Form tracker needs either a form or an element ID') var checkEveryMilliseconds = 500; formTrackerInterval = window.setInterval(function(){ var target = "" if (formIndex &gt;= 0) { var form = document.getElementsByTagName('form') target = (form.length &gt; 0) ? form[formIndex].textContent : ""; } else target = document.getElementById(targetId).textContent target = target.toLowerCase() if (target.indexOf(text) &gt; -1) { window.clearInterval(formTrackerInterval); dataLayer.push({ event: 'formSubmitted' }) } },checkEveryMilliseconds) &lt;/script&gt; [/code] Step 2 Now we need to add the script to listen out for when the form is submitted. Create a custom HTML tag in your GTM container. You can name the tag 'LISTENER Contact form submit event' or anything else you will remember it by. Choose the tag type 'Custom HTML'. Copy and paste your HTML/Javascript into the textbox, and remember to change the var text (line 10) with your own text. Step 3 This tag needs a firing trigger, specifying the rules when it needs to be activated. If you can, only fire on specific pages - the script will slow down the page a little, as it runs every half a second to check the form. Give the trigger a descriptive name - here I've chosen "PAGE About us" Select trigger type as 'Custom Event' and for the event name put " gtm.load ", which means this trigger at page load. We want this trigger to work on a specific page only, so the firing rule goes 'page path equals /about-us', which means that our trigger will work on the www.littledata.io/about-us page only. If you have a number of pages that have the form you're tracking, then you could use 'contains' rule and select part of the link that is applicable to all. For example, if all of your links have word 'contact' in them, then your firing rule would say 'page path contains contact'. Step 4 Now that you have your listener tag set up, you need to create a separate tag to send the event details to Google Analytics. Again, give it a descriptive name so you know what it's for - here I've used 'GA event - contact form submitted'. Select tag type as 'Universal Analytics' and in the tracking ID field, select the variable that contains your GA tracking id. For event category, action and label you have to specify the namings by which this data will be categorised in Google Analytics. Step 5 This tag needs its own trigger to know when to fire, and here you have to use the event created by the listener tag set up during steps 2-3. Here you have to specify that this tag can only fire when event 'formSubmitted' happens. I've called my trigger 'Contact form event', selected trigger type as 'custom event' and entered event name 'formSubmitted. Now you can save it and test in the debugger mode. Try submitting your contact form and see if the event 'formSubmitted' appears. You should also see the tag 'GA event - contact form submitted' fire. If everything's ok, publish the container and do a final test. Make a new form submission and check if you can see the event details come through in Google Analytics real time reports, under events. Need some help setting this up or Google Tag Manger? Why not get in touch by contacting our lovely Google Analytics experts?   Get Social! Follow us on LinkedIn, Twitter, and Facebook and keep up-to-date with our Google Analytics insights. Further reading: How to set up event tracking in Google Tag Manager Why should you tag your campaigns? Set up Ecommerce tracking with Google Tag Manager

2016-10-11

Google Optimize versus Optimizely

I’ve been an Optimizely certified expert for a couple of years and have now trialled Google Optimize 360 for a few months, so it seems a good time to compare how they stack up. Optimizely is the current market leader in AB testing (or content experimentation), due to its ease of use and powerful reporting tools. It gives companies an easy way to run many concurrent tests and manage their setup and roll out without the involvement of developers. That was a big step up from Google Content Experiments, where the only way to set up an experiment is to write some Javascript code. The Guardian had some success with Optimizely, where they increased subscriptions by 46%. Google Optimize is an equivalent testing tool, and has copied much of the user interface that made Optimizely popular: you can click on elements within the page to experiment, and change their style, hide them or move them. My only complaint is that the interface is so simple it can take a while to unbury powerful features, such as transform the page via a custom script. There have been many success stories of companies implementing Google 360. Technically, Optimize’s editor is a bit smoother; using a Chrome plugin avoids some of the browser security issues that bugged Optimizely (since internet browsers confused the Optimizely in-page editor with some kind of script hacking). For example, to load Littledata’s homepage in their editor I have to enable ‘insecure scripts’ in Chrome and then navigate to a different page and back to force the editor to re-render. For reporting, Google Optimize 360 gives the ability to see results either in Optimize or as a custom dimension in Google Analytics – so equivalent to Optimizely. Right now Optimize lacks some features for advanced scheduling and user permissions, but I expect those to evolve as the product gathers momentum. The critical difference is with the targeting options Optimizely allows you to target experiments based on the device accessing the page (mobile vs desktop, browser, operating system) and for enterprise plans only to target based on geolocation. The limitation is that every time Optimizely needs to decide whether to run the test, the check for the user’s location may take a few seconds – and the landing page may flicker as a test rule is triggered on not. Google Optimize can target to any audience that you can build in Google Analytics (GA). This means any information you capture in Google Analytics – the number of previous visits, the pages they have previously seen or the ecommerce transactions – can be used in a test or personalisation. For example, in Google Optimize you could serve a special message to users who have previously spent more than $100 in your store. Optimizely has no knowledge of the users’ actions before that landing page, so the only way you could run an equivalent personalisation is to expose this previous purchase value as a custom script on the landing page (or in a cookie). The beauty of Google Optimize is that you are targeting based on information already captured in Google Analytics. There is no technical setup beyond what you were already doing for Google Analytics, and it doesn’t take a developer to build targeting for a very specific audience. Pricing Optimizely starts from under $100/month, but to get access to enterprise features (e.g. for geo-targeting) you will need to spend $2000 plus per month. Google Optimize is currently being sold at a flat rate of $5000 / month for the basic tier of Google 360 customers (which have between 1M to 50M sessions per month), but in future, it could be offered at a lower price to smaller companies. Conclusion Where you’ll appreciate the benefits of Google Optimize is for running personalisations based on complex rules about previous user behaviour, or the campaigns they have seen. The more different tests you are running, the more time and simplicity saving you will get from building the audience in Google Analytics rather than some custom scripts. Google Optimize 360 is currently in beta but you can currently add your email to invite list. For smaller customers, or those with less complex needs, Optimizely still offers better value – but that might change if Google were to offer a limited version of Optimize at a lower price.   Get Social! Follow us on LinkedIn, Twitter, and Facebook and keep up-to-date with our Google Analytics insights.   Further reading: Create and customise dashboards and widgets in Google Analytics New in Littledata: an improved navigation, trend detection algorithm, and more How to set up internal searches in Google Analytics Image credit: Blastam  

2016-10-05

Get the Littledata analytics app

Start your free 14-day trial

Learn More