Will a computer put you out of a job?

I see a two tier economy opening up in England, and it’s not as simple as the haves and have-nots. It’s between those that build machines, and those that will be replaced by them: between those that can code, and those that can’t. We’ve seen the massive social effects that declining heavy manufacturing jobs since 1970s have had on much of the North of England and Scotland, and I believe we’re at the start of a similar long-term decimation of service industry jobs – not due to outsourcing to China, but due to automation by computers.  Lots of my professional friends in London would feel they’re beyond the reach of this automation: their job involves being smart and creative, not doing production-line tasks. But it is these jobs, which currently involve staring at numbers on a screen, which are most at risk from computer substitution. If your job involves processing a load of data into a more presentable format (analysts, accountants, consultants and some types of traders) then a computer will eventually - within the next 20 years - be able to do your job better than you. In fact, within 20 years computers will be much better than humans at almost every kind of data processing, as the relentless extension of Moore’s law means pound-for-pound computer processing will be 1 million times cheaper than it is now. As Marc Andreessen put it, ‘Software is eating the world’, and we’re only just beginning to work through the implications.  This worries me. With the greater and greater levels of automation of the working world, what happens to employment? Last year we saw an incredible event in the sale of WhatsApp to Facebook: massive wealth creation ($17bn) accompanied by almost no job creation (33 employees at the time of sale). If a tiny number of highly skilled people can create a service with 300m paying customers, why do companies need to hire lots of people? In the utopian view of future work we give up all boring admin tasks to the machines, and focus on face-to-face interaction and making strategic decisions based on selected knowledge fed to us by our personal digital agents (like Google search on steroids). Lots more thinking space leads us to be more productive, and more leisure time makes us happier. But 30 years ago they thought computers would evolve into very capable personal assistants, when in fact office workers are chained to the screen for longer hours by the tyranny of email and real-time information flow. Look at Apple’s forecast from 1987 of what computing might look like in 2006: the professor is freed from the tedium of typing or travelling to the library. Yet they didn’t consider whether the professor himself might be needed in a world where students could get their lectures as pre-recorded videos. So the cynical view is that more volume of data will require more humans to interpret, and the technology will always need fixing. As companies become more automated there will be more and more jobs shifting into analysis and IT support; analogous to how, as postal mail has been replaced by email, jobs in the company post room have shifted into IT support. The problem is that there really are a limited number of humans that can set up and maintain the computers. I’d love to see society grappling with that limitation (see grass-roots initiative like CoderDojo) but there are some big barriers to retraining adults to code: limited maths skills, limited tolerance for the boredom of wading through code, and limited opportunities for people to test their skills (i.e. companies don’t trust this most critical of job roles to new apprentices). So those that have commercial experience in programming can command escalating day rates for their skills – and this is most apparent in London and San Francisco, while pay in other skilled areas is not even keeping up with core inflation. That leads us to the dystopian view: that the generation starting their working lives now (those 10 years younger than me) will see their prospects hugely diverge, based on which side of the ‘replace’ or ‘be replaced’ divide they are. If companies akin to Google and Facebook become the mainstay of the global economy, then they’ll be a tiny number of silicon sultans whose every whim is catered for – and a vast mass of technology consumers with little viable contribution to the workplace. Let’s hope our politicians start grasping the implications before they too are replaced by ‘democracy producing’ software!

2015-03-27

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

Best enhanced ecommerce plugins for Magento

With the release of Google Analytic's Enhanced Ecommerce tracking, Magento shop owners now also have the option to track more powerful shopping and checkout behaviour events. Using a Magento plugin to add the tagging to your store could save a lot of development expense. But choosing a third party library has risks for reliability and future maintenance, so we’ve installed the plugins we could find to review how they work. The options available right now are: Tatvic’s Google Analytics Enhanced Ecommerce plugin (there is also a paid version with extra features) BlueAcorn’s ‘official’ Google Enhanced Ecommerce for Magento plugin Scommerce Mage's Google Enhanced Ecommerce Tracking plugin Anowave – they have a GTM and non-GTM plugin available for €150, but declined to let us test them for this review DIY – send the data directly from Google Tag manager Advanced features Plugin Checkout options? Promotions? Social interactions? Refunds? Tatvic - - - - BlueAcorn  Y  -  -  - Scommerce Y Y - Y Anowave Y Y Y Y DIY setup Y Y - - Our overall scoring Plugin Ease of install Flexibility Privacy Cost Tatvic 4 2 2 Free BlueAcorn 3 1 5 Free Scommerce 3 3 5 £65 / US$98 None (DIY) 1 5 5 Your time! There is no clear winner so choose the plugin that suits your needs best. If you are concerned about data privacy then go for either BlueAcorn or Scommerce, but pick Tatvic's plugin if you prefer easiest installation process. If you want to spend more time capturing further data – like promotions and refunds – you might want to consider implementing the tracking yourself with Google Tag Manager. Tatvic’s plugin Advantages: Fast and easy to install (it took less than an hour to configure everything). Good support by email after installation. Basic shopping behaviour and checkout behaviour steps captured. Disadvantages: It injects a Google Tag Manager container into your site that only Tatvic can control. Some reviewers on Magento Connect raised privacy concerns here, so Tatvic should clarify how and why they use this data. At the very least it is a security flaw, as any Javascript could be injected via that container. * Product impressions are only segmented by product categories - there is no separation for cross-sell, upsell or related products widgets. No support for coupon codes or refunds. * Tatvic can help you configure your own GTM container if their standard setup is an issue for you. Scommerce plugin Advantages: It doesn’t need Google Tag Manager, so you can be sure that no one can add scripts to your site. You can install from Magento Connect. Update on 24 Aug 2015: Supports one page checkout. BlueAcorn plugin Advantages: Easy to install. It doesn't add Google Tag Manager to your site. Disadvantages: You have to set your shop currency to US dollars. Support is slow to respond. Enable Enhanced Ecommerce reporting To be able to install listed plugins for Magento, you will first of all need to enable Enhanced Ecommerce tracking in Google Analytics. If you already have it enabled, you can skip this section. Go to Google Analytics > Admin > View > Ecommerce Settings. Enable Enhanced Ecommerce and set up the checkout funnel steps (see the screenshot for standard checkout steps).  Remove your Google Analytics tracking code from the website. Installing Tatvic’s plugin Go to Magento Connect centre, open the “settings” tab and enable beta extensions.  Go back to the “extensions” tab, paste the link into extension and click 'Install'.  You should see a successful completion message.  Go back to the configuration page. Don't worry if you see 404 error.  Log out and back in again and you shouldn't see the error anymore.  Now add the missing details in the configuration settings, eg Google Analytics account, checkout URL. You should see all the checkout steps working.  Installing BlueAcorn plugin BlueAcorn's plugin supports only stores that have their currency set to US dollars. If your online shop is in any other currency, you won't be able to see most of the data on your product's sales performance. Installing BlueAcorn's plugin is similar to Tatvic's but you have to do two extra steps. Go to the cache store management, select all items, select 'Disable' from the Actions dropdown list and click 'Submit'.  Go to System > Tools > Compilation and click button ‘Disable’.  Install the plugin. Log out and log back in. Re-enable the cache by going back to the cache store management, select all items and enable them. Go to the Google API tab (System > Configuration > Google API), enable plugin and insert your Google Analytics account number.  Installing Scommerce plugin Disable compilation mode by going to System > Tools > Compilation and click 'Disable' button.  Disable Google Analytics API.  Upload module to root folder (PDF). Now flush the cache.   Configure plugin.   If you have any further queries regarding the plugins we reviewed, don't hesitate to let us know in the comments.

2015-02-18

Agriculture in Uganda: Measure and Improve

I had a truly inspiring day visiting Send a Cow project near Masaka in Uganda. A group of 30 farmers underwent 4 years of training, supported by weekly visits from a social worker and agricultural trainer. From a group living in absolute under-a-dollar-a-day poverty, there are now farmers owning thousands of dollars worth of livestock and selling export crops like coffee. This education and support, plus the capital grant of one animal per household, has transformed their community. Although the success relied on a solid base of family and group cohesion, organised labour and animal husbandry, I want to focus on three aspects which have ongoing potential for the community. 1. Record keeping Yep, data to you and I. Writing daily details of milk yields, crop inputs, market sale prices and even visitor numbers enabled the farmers to measure and improve. Data also allows farmers to forecast and be inspired. Selling a regular surplus of milk from two cows (after family consumption – yes, they have great teeth!) gave the farmer a regular income of US$3.50 per day at the farm gate. That is more than a teacher’s salary in Uganda.  With tender care and back-breaking forage harvesting, they now have a calf being reared – and can count just how much that will mean in further milk and profits. Maybe in 10 years they will be entering yields into a smartphone app, and have market prices forecast automatically. 2. Organic agriculture Oil derivatives (like diesel and fertiliser) are nearly as expensive in Uganda as the UK – in ridiculous contrast to the local market prices for vegetables. Efficient farming therefore has to rely on minimal imported inputs, and maximise the local bounty of sun, rain … and manure. Every precious drop of animal urine is captured – to mix with ash and chilli as an insect repellant for plants – or used neat as a fertiliser. In dry season, every rainfall is maximised, with lots of mulching of vegetables to prevent evaporation; and with a permaculture approach of shading coffee bushes with banana plants, and vegetables under the coffee. I am a fan of organic farming for health and environmental reasons, but out here I just do not see an alternative, cost-effective way to increase crop yields. 3. Peer-to-peer lending Developed-to-developing country lending networks, like Kiva.org, have grown rapidly – but with inevitable problems in vetting funding applications at distance. What farmers need are equivalents of 19th century Europe’s co-operative societies – where savers and lenders from the same area are brought together.  These farmer groups operate a very effective local system. All members pledge to save every month: from just 1 cent a week. Then any member can ask for a short term (maximum 3 month) loan from the fund – which is now $2000. The default rate is low – around 2% - as members know the debtors ability to repay, and can monitor progress in person. Plus every debtor has savings in the scheme – so wants to preserve their share of the capital. Three month loans (and flat 10% interest) make repayments easy to predict – and work in a country where planting to harvest is only 3 months. Uganda’s government abolished co-operatives in the 1990s when they started sponsoring political campaigns. But if these lending clubs can grow they could go some way to unlocking the capital that Africa needs to grow. This post was written by Edward Upton, Founder of Littledata, @eUpton

2015-02-17

Under the hood of Littledata

Littledata tool gives you insight into your customers' behaviour online. We look through hundreds of Google Analytics metrics and trends to give you summarised reports, alerts on significant changes, customised tips and benchmarks against competitor sites. This guide explains how we generate your reports and provide actionable analytics. 1. You authorise our app to access your Google Analytics data As a Google Analytics user you will already be sending data to Google every time someone interacts with your website or app. Google Analytics provides an API where our app can query this underlying data and provide summary reports in our own style. But you are only granting us READ access, so there is no possibility that any data or settings in your Google Analytics will change. 2. You pick which view to report on Once you've authorised the access, you pick which Google Analytics view you want to get the reports on. Some people will have multiple views (previously called ‘profiles’) set up for a particular website. They might have subtly different data – for example, one excludes traffic from company offices – so pick the most appropriate one for management reports. We will then ask for your email so we know where to send future alerts to. 3. Every day we look for significant changes and trending pages There are over 100 Google Analytics reports and our clever algorithms scan through all of them to find the most interesting changes to highlight. For all but the largest businesses, day-by-day comparisons are the most appropriate way of spotting changing behaviour on your website. Every morning (around 4am local time) our app fetches your traffic data from the previous day – broken down into relevant segments, like mobile traffic from organic search – and compares it against a pattern from the previous week. This isn’t just signalling whether a metric has changed – web traffic is unpredictable and changes every day (scientists call this ‘noise’). We are looking for how likely that yesterday’s value was out of line with the recent pattern. We express this as signal bars in the app: one bar means there is a 90% chance this result is significant (not chance), two bars means a 99% chance and three bars means 99.9% certain (less than a 1 in 1000 chance it is a fluke). Separately, we look for which individual pages are trending – based on the same probabilistic approach. Mostly this is change in overall views of the page, but sometimes in entrances or bounce rate. If you are not seeing screenshots for particular pages there are a few reasons why: The website URL you entered in Google Analytics may be out of date Your tracking code may run across a number of URLs – e.g. company.com and blog.company.com – and you don’t specify which in Google Analytics The page may be inaccessible to our app – typically because a person needs to login to see it 4. We look for common setup issues The tracking code that you (or your developers) copy and pasted from Google Analytics into your website is only the very basic setup. Tracking custom events and fixing issues like cross-domain tracking and spam referrals can give you more accurate data – and more useful reports from us. Littledata offers setup and consultancy to improve your data collection, or to do further manual audit. This is especially relevant if you are upgrading to Universal Analytics or planning a major site redesign. 5. We email the most significant changes to you Every day - but only if you have significant changes - we generate a summary email, with the highest priority reports you should look at. You can click through on any of these to see a mobile-friendly summary. An example change might be that 'Bounce rate from natural search traffic is down by 8% yesterday'. If you usually get a consistent bounce rate for natural / organic search traffic, and one day that changes, then it should be interesting to investigate why. If you want your colleagues to stay on top of these changes you can add them to the distribution list, or change the frequency of the emails in My Subscriptions. 6. Every Sunday we look for changes over the previous week Every week we look for longer-term trends – which are only visible when comparing the last week with the previous week. You should get more alerts on a Sunday. If you have a site with under 10,000 visits a month, you are likely to see more changes week-by-week than day-by-day.   To check the setup of your reports, login to Littledata tool. For any further questions, please feel free to leave a comment below, contact us via phone or email, or send us a tweet @LittledataUK.

2015-02-05

What's new in Google Analytics 2014

Google has really upped the pace of feature releases on Analytics and Tag Manager in 2014, and we’re betting you may have missed some of the extra functionality that’s been added. In the last 3 months alone we’ve counted 11 major new features. How many have you tried out? Official iPhone app. Monitor your Google Analytics on the go. Set up brand keywords. Separate out branded from non-brand search in reports. Enhanced Ecommerce reporting. Show ecommerce conversion funnels when you tag product and checkout pages. Page Analytics Chrome plugin. Get analytics for a particular page, to replace old in-page analytics. However, it doesn’t work if you are signed into multiple Google Accounts. Notifications about property setup. Troubleshoot common problems like domain mis-matches. Embeded Reports API. So you can build custom dashboards outside of GA quickly. Share tools across GA accounts. Now you can share filters, channel groupings, annotations etc easily between views and properties Tag Assistant Chrome plugin. Easily spot common setup problems on your pages using the Tag Assistant. Built-in user tracking. See our customer tracking guide for the pros and cons. Import historic campaign cost and CRM data (premium only). Previously, imported data would only show up for events added after the data import. Now you can enter a ‘Query Time’ to apply to past events, but only for Premium users. Get unsampled API data (Premium only - developers). Export all your historic data without restrictions Better Management API (for developers). Set up filters, Adwords links and user access programmatically across many accounts. Useful for large companies or agencies with hundreds of web properties.

2014-07-21

Pulling Google Analytics into Google Docs - automated template driven reporting

The Google Docs library for the analytics API provides a great tool for managing complex or repetitive reporting requirements, but it can be tricky to use. It would be great if it was a simple as dropping a spreadsheet formula on a page, but Google’s library stops a few steps short of that - it needs some script around it. This sheet closes that gap, providing a framework for template driven analytics reports in Google Docs. With it you can set up a report template, and click a menu to populate it with your analytics results and run your calculations - without needing to write a line of script - the code is there if you want to build on it, but you can get useful reports without writing a line of script. Prerequisites While you don't have to write code to use this, there are some technical requirements. To get the most out of it you'll need to have: your Google analytics tagging and views set up familiarity with Google’s reporting API familiarity with Google Docs spreadsheets - some knowledge of Google apps scripting is an advantage If you are looking for something more user-friendly or tailored to your needs, contact us and book a consultation to discuss - we can help with your analytics setup and bespoke reporting solutions. Getting started Setting this up takes a few steps, but you only need to do this once: Open the shared Google spreadsheet Make a copy Enter a view ID in the settings sheet - get this from the Google Analytics admin page. Authorise the script Authorise the API - in the API console - this is the only time you need to go into the script view using Tools|Script Editor Once in script editor select Resources|Advanced Google services On the bottom of the Advanced Google services dialogue is a link to the Google Developers Console, follow this and ensure that Google analytcs API is set to On You're done. You can go back to the spreadsheet and run the report (on the Analytics menu). From now on all you need to do is tweak any settings on the template and run the report.   Setting up your own report template You can explore how the template works using the example. Anywhere you want to retrieve value(s) from Google Analytics, place this spreadsheet function on the template: = templateShowMetric(profile, metric, startdate, enddate, dimensions, segment, filters, sort, maxresults) This works as a custom spreadsheet function, for example =templateShowMetric(Settings!$B$2,$B7,Settings!$B$3,Settings!$B$4,$C7,$D7,$E7,$F7,$G7) Note that in the example, several of the references are to the settings sheet, but they don't have to be, you can use any cell or literal value in the formula - it's just a spreadsheet function. To get the values for the API query, I'd suggest using Google’s query explorer. To set this up for a weekly report, say, you would have all the queries reference a single pair of cells with start and end dates. Each week you would change the date cells run the report again - all queries will be run exactly as before, but for the new dates. Using spreadsheet references for query parameters is key. This opens up use of relative and absolute references - for example if you need to run the same query against 50 segments, you list your segments down a column, set up segment as a relative reference, and copy the formula down spreadsheet style. You can use this to do calculations on the sheet and use results in the analytics API, for example you might calculate start and end dates relative to current date. Future posts will cover setting up templates in more detail. Under the hood The templateShowMetric function generates a JSON string. When you trigger the script, the report generator copies everything on the template to the report sheet and: runs any analytics queries specified by a templateShowMetric function removes any formulas that reference the settings sheet (so you can use the settings sheet to pass values to the template, but your reports are not dependant on the settings staying the same)

2014-04-21

Get the Littledata analytics app

Complete picture of your ecommerce business. Free Google Analytics connection, audit and benchmarks.

Sign up

Insights from analytics experts

Subscribe to the Littledata blog for the latest posts and updates

No Thanks
We respect your privacy. Your information is safe and will never be shared.
Don't miss out. Subscribe today.
×
×