A case study in how to improve page load speed

We used one of Littledata's own benchmarks to identify an issue with mobile page load speed and fix the underlying problems. Here's how we did it. Page load speed benchmark Using benchmarking in the Littledata app, we compared our website with 72 other marketing services sites benchmarked in December. (Our app lets you compare web performance by sector). Paying attention to both mobile and desktop experiences, we looked at things like the average delay before page content appears and the average time before full mobile page load. Overall we are above average, but against one benchmark - delay before page content appears - we are close to the median. That means 35 sites in our sector manage faster page load speeds. As website professionals, we can't let that rest! We care because Google cares about speed. If our landing pages take a long time before first 'paint' - before the content is visible - then more visitors will bounce or pick another article to answer their questions. If we invest time into writing articles like this one on our analytics blog, we should also invest time in making sure they are fast to load, and fast for Google to crawl and index. Here's how we acted on the benchmark data. [subscribe heading="Benchmark your site" button_text="sign up"] How fast were pages loading? We used the excellent PageSpeed Insights tool to pinpoint what was going wrong with the pages loading. Our original speed on mobile For mobile browsers, where traffic increasingly comes from, we were in the bottom 10% for speed, and below average for desktop. That sucks, and was definitely penalising our organic search rankings. Fixes to improve page load speed 1. Removing unnecessary JavaScript modules As a 'web app' built using Meteor, our pages are heavy with Javascript - effectively the whole site is pre-loaded with the first page. This means a module used by only one page can slow down ALL pages. By visualising the bundles for our Meteor App we found 2 very large modules which were blocking page load for all pages: the D3 library, used to visualise our industry category coverage, and the autoform package used for a single signup form. Using the clever dynamic imports feature in Meteor were were able to cut those modules from the landing page, and half the size of the Javascript bundle loaded from 1.6Mb to 0.8Mb. 2. Using Webp images for Chrome and compatible browsers Google prefers you to use the more efficient .webp image filetype, which is typically half the file-size of older .png or .jpeg filetypes. We found our chosen image server, Cloudinary, includes a simple feature to automatically chose the best file type for the browser it detects. Very quick fix! 3. Lazy-loading of landing page images Even if the images are efficiently served, trying to fetch all the images for a long-form landing page takes time - and is wasteful for users who only read the first few paragraphs. Instead, we can wait until the user scroll down before images are loaded for that section. This results in a small flicker as the user scrolls the first time, but faster initial load time. 4. Caching pages from our blog Wordpress is a great CMS, but the PHP + MySQL stack it uses is not the fastest for generating the pages. Luckily there are some great cache plugins, including WP Fastest Cache which we set up. What this does is save a rendered HTML file on the WP server, and only refresh the cache when the post is edited or new comments are added. 5. Cleaning up unused CSS and HTML templates Like all sites that have evolved their design and content over a few years, ours had lots of redundant code that no-one had spring-cleaned. Generally it's easier with older projects just to leave code, but for Meteor apps particularly it can slow down every page (see fix 1). So a new front-end developer starting was a good chance to rewrite templates from scratch, and chuck out the trash. The page load speed improvements Those 5 improvements, plus a database upgrade, let to some pretty good speed improvements - above average for mobile and top 2% for desktop speed! Even a few days after the release we saw a boost in the visibility of our landing pages in Google Search. Looking at Littledata's benchmarks for February, included in the newly released mobile vs desktop benchmarks, we can see the delay before content appears has dropped from 2.6 to 1.8 seconds (down by 40%). And the desktop speed is now in the top 10% of all sites at 1.7 seconds. The only area we still lack is the mobile page speed, so maybe we will look at some AMP versions in the next sprint. Ready to benchmark your site? Littledata's free plans include a Google Analytics connection and free benchmarks in ecommerce, engagement, marketing and site speed.

2019-03-13

Littledata's Shopify connection is now using gtag and GTM data layer

Littledata’s Shopify app is updating to use Google’s latest tracking code library. This will simplify your setup for Google Ads and speed up your site. Google’s ‘global site tag’ or gtag has been live for a year now and is stable for Littledata to adopt. In version 5 of our tracking script we now use gtag for all the events sent to Google Analytics. The advantages of gtag are: Integrates with Google Ads out of the box – no need for separate Google Ads conversion tracker Smaller Javascript library = faster page load times Future proof for using Google Optimize In addition, we are now using the standard 'data layer' format used by Google Tag Manager. This will make it easier for all you hackers to extend Littledata's tracking and use GTM with the enhanced ecommerce data layer, and easily create tags for marketing platforms like: Facebook, Criteo, etc. [subscribe] We've also moved to using the default ecommerce event naming recommended by Google. For example, the event category 'Ecommerce' is now 'ecommerce' (lower case) and event action 'Add to cart' is now 'add_to_cart' (snake case). If you have goals or reports based on the old event names you may need to update them. One final change is that we're only sending page views to GA when the page is not hidden in the browser. Certain advertising campaigns, including SnapChat ads, preload your webpages to provide a faster experience for users, but this skews your analytics with lots of low-grade visits who didn't actually 'see' your landing page. How to update the script If your store already has our tracking script installed, just click on the in-app notification to update. Not a Littledata user yet? If you're struggling with implementing Google Ads conversion tracking or GTM for a Shopify store, check out our Google Analytics connections for Shopify and Shopify Plus stores. Let our app fix your tracking, so you can get back to business!

2019-02-12

How to calculate customer lifetime value (CLV) for subscription ecommerce in Google Analytics

Many of Littledata's subscription customers come to us with a similar problem: how to calculate return on advertising spend, considering the varying customer lifetime value (CLV) of subscription signups. Calculating marketing ROI for subscription ecommerce is a big problem with a number of potential solutions, but even the initial problem is often misunderstood. In this post I break down what the problem is, and walk through two proven solutions for getting consistent, reliable CLV reporting in Google Analytics. What is customer lifetime value? I work with all kinds of subscription ecommerce businesses: beauty boxes, nutritional supplements, training courses and even sunglasses-by-the-month. All of them want to optimise customer acquisition costs. The common factor is they are all willing to pay way MORE than the value of the customers' first subscription payment... because they expect the customer to subscribe for many months. But for how many months exactly? That's the big question. Paying for a marketing campaign which bring trial customers who cancel after one payment - or worse, before the first payment - is very different from paying to attract sticky subscribers. A marketing director of a subscription business should be willing to pay WAY more to attract customers than stay 12 months than customers who only stay one month. 12 times more, to be precise. So how do we measure the different contribution of marketing campaigns to lifetime customer value? In Google Analytics you may be using ecommerce tracking to measure the first order value, but this misses the crucial detail of how long those shoppers will remain subscribers. With lifetime customer value segments we can make more efficient use of media, tailor adverts to different segments, find new customers with lookalike audiences and target loyalty campaigns. There are two ways for a marketing manager to see this data in Google Analytics: one is a more difficult, manual solution; the other is an easier, automated solution that ties recurring payments back to the original campaigns. A manual solution: segment orders and assign a lifetime value to each channel It's possible to see the required data in GA by manually segmenting orders and assigning a lifetime value to each channel. For this solution you'll need to join together: (a) the source of a sample of first orders from more than a year ago, by customer number or transaction ID and (b) the CLV of these customers The accuracy of the data set for A is limited by how your Google Analytics is set up: if your ecommerce marketing attribution is not accurate (e.g. using Shopify's out-the-box GA scripts) then any analysis is flawed. You can get B from your subscription billing solution, exporting a list of customer payments (and anonymising the name or email before you share the file internally). To link B to A, you'll need either to have the customer number or transaction ID of the first payment (if this is stored in Google Analytics). [subscribe] Then you can join the two data sets in Excel (using VLOOKUP or similar function), and average out the lifetime value by channel. Even though it's only a sample, if you have more than 100 customers in each major channel it should give you enough data to extrapolate from. Now you've got that CLV by channel, and assuming that is steady over time, you could import that back into Google Analytics by sending a custom event when a new customer subscribes with the 'event value' set as the lifetime value. The caveat is that CLV by channel will likely change over time, so you'll need to repeat the analysis every month. If you're looking to get away from manual solutions and excessive spreadsheets, read on... A better solution: tie recurring payments back to the original campaign(s) What if you could import the recurring payments into Google Analytics directly, as they are paid, so the CLV is constantly updated and can be segmented by campaign, country, device or any other standard GA dimension? This is what our Google Analytics connection for ReCharge does. Available for any store using Shopify as their ecommerce platform and ReCharge for recurring billing, the smart connection (integration) ties every recurring payment back to the campaigns in GA.  Here's how the connector works The only drawback is that you'll need to wait a few months for enough customer purchase history (which feeds into CLV) to be gathered. We think it's worth the wait, as you then have accurate data going forward without needing to do any manual imports or exports. Then, if you also import your campaign costs automatically, you can do the Return on Investment (ROI) calculations directly in Google Analytics, using GA's new ROI Analysis report (under Conversions > Attribution), or in your favourite reporting tool. Do you have a unique way of tracking your marketing to maximise CLV? Are there other metrics you think are more important for subscription retailers? Littledata's connections are growing. We'll be launching integrations for other payment solutions later this year, so let us know if there's a particular one you'd like to see next.

2019-02-05

Shopify's 'sales by traffic source' report is broken

If you're a Shopify store manager, one of your biggest questions should be 'which campaigns lead to sales?'. We looked at data from 10 Shopify Plus customers to see whether the sales by traffic source report can be trusted. Under the Shopify store admin, and Analytics > Reports tab, you can (in theory) see which sessions and sales came from which traffic sources. BUT this sales by traffic source report is broken. Looking at 180,000 orders for 10 stores in Q4 2018, here are the marketing channels which Shopify Analytics says brought the traffic: Direct 83.5%Social 9%Search 4.5%Unknown (other websites, not social or search) 3%Email ~0.1% And using comparative data from Google Analytics we know this is all wrong. Here's a comparison of Shopify's attribution to Google Analytics last-click attribution of sales for one of these customers: Marketing attribution comparison for 700 orders Shopify Google Analytics Direct 99% 43% Search (Paid + Organic) 0.6% 7% Social 0.4% 10% Email - 25% Affiliates - 15% Here's why it's broken 'Direct' traffic is when the source is unknown. But for Shopify's report this means where the source of the last session is unknown - the user most probably visited a search ad or product review previously. Having only 1% visibility on your marketing performance is just not acceptable!We know that tagged Facebook traffic alone represents 7% of traffic for the average store, so 10% of sales from Social is more normal. Social also brings more than the actual sales in terms of visibility and influencers.Google generates billions of pageviews a month for ecommerce stores. If your site gets only 1% of its traffic from search, we'd be very surprised! Including paid search this site is still well below the 40% average. (Check out our 6 essential benchmarks for Shopify stores.)Monthly emails and personalised retargeting emails are now a staple of online marketing, and we know all the customers in this analysis use email marketing of some form - including for new product launches, discounts and cart abandonment campaigns. The problem is, it's unlikely to be the only campaign which brought customers, so it gets drowned out by other 'last click' channels. The solution: multi-channel attribution.Affiliates are a really important channel to get right, as they are paid based on the sales attributed to them. Why should you rely solely on the report the affiliate marketer gives you, and not see the same numbers in Google Analytics? So don't leave your marketing analytics to guess-work! Try the Littledata app to connect Shopify with Google Analytics on a free trial today. All paid plans include unlimited connections, to ensure accurate marketing attribution for sales via ReCharge (subscriptions), CartHook (one-page checkout), Refersion (affiliates) and more.

2019-02-04

The year in data: 2018 in ecommerce statistics

How did ecommerce change in 2018? Let's take a look at the data. Littledata benchmarks online retail performance in Google Analytics, and with over 12,000 sites categorised across 500 industry sectors we have a unique insight into ecommerce trends in 2018. The pattern we're seeing is that web sessions are becoming ever shorter as users split their attention across many ads, sites and devices. Marketers need get visibility across a range of platforms, and accept that a customer purchase journey will involve an ever greater number of online touch points. In the following analysis, we look at how performance changed across 149 ecommerce sites in 2018, and how these trends might continue in 2019. Ecommerce conversion rate is down Ecommerce conversion rate has dropped by an average of 6 basis points, not because of a drop of online sales - but rather because the number of sessions for considering and browsing (i.e. not converting) has risen. This is partly an increase in low-quality sessions (e.g. SnapChat ads preloading pages without ever showing them to users), and partly an increase in users from platforms like Facebook (see below) which bring less engagement with landing pages. See our mission to Increase Ecommerce Conversion Rate for more details. Revenue per customer is up Revenue per customer is the total sales divided by the total number of users which purchased online. The increase of $16 USD per customer per month shows that many stores are doing better with segmentation - ignoring all those sessions which don't convert, and retargeting and reselling to those that buy lots. The growth in subscription business models is also fuelling this trend. Getting a customer to commit to a regular payment plan is the most effective way of increasing revenue per user. See our mission to Increase Average Order Value for more details. Reliance on the homepage is down Content marketing became mainstream in 2018, and no self-respecting brand would now rely on the homepage alone to drive interest in the brand. The percentage of traffic coming 'through the front door' will continue to fall. In building out a range of keyword-specific landing pages, stores are harnessing a wider range of Google search queries, and providing more engaging landing pages from Google Ad and Facebook Ad clicks. Usage of internal site search is up Along with fewer visitors coming through the homepage, we are seeing fewer browsers use traditional category navigation over internal search. We think this is partly to do with younger consumers preference for search, but also probably reflects the increasing sophistication and relevance of internal search tools used by ecommerce. Referrals from Facebook are up Even after Facebook's data security and privacy embarrassments in 2018, it continues to grow as the 2nd major global marketing platform. Although few sites in our benchmark rely on Facebook for more than 10% of their traffic, it is a significant driver of revenue. As merchants continue to come to Littledata to find out the real ROI on their Facebook Ads, check back next year for a new round of analysis! How did your site perform? If you're interested in benchmarking your ecommerce site, Littledata offers a free trial to connect with Google Analytics and audit your tracking. You can see ecommerce benchmarks directly in the app, including 'ecommerce conversion rate', 'referrals from Facebook' and 'reliance on the homepage', to know exactly how your site's performing. Sign up today to benchmark your site and import Facebook Ads data directly into Google Analytics. [subscribe] For this article we looked at Littledata's private, anonymized benchmark data set, selecting ecommerce sites that had a majority of their traffic from the US and more than 20,000 sessions per month. We measured the change from 1st December 2017 to 31st December 2017 to the same month in 2018.

2019-01-28

Introducing Shopify Flow connectors for Google Analytics

Littledata has launched the first Shopify Flow connector for Google Analytics, enabling Shopify Plus stores to analyse customer journey using a custom event in Google Analytics. In addition to Littledata's native connections with Shopify, Shopify Plus, Facebook Ads, ReCharge, etc., we have now launched a beta version of a Flow connector for Google Analytics. What is Shopify Flow? Flow is an app included with Shopify Plus, which enables stores to define automation pathways for marketing and merchandising. Think of it as an ‘If This Then That’ generator just for Shopify. For example, after an order is marked as fulfilled in Shopify’s admin you might want to trigger an email to ask for a review of the product. This would involve setting a ‘trigger’ for when an order is fulfilled and an ‘action’ to send an email to this customer. How do you use Littledata Flow actions? You install Littledata's Shopify app along with Shopify Flow Every time an order is created in your store we send it to Google Analytics, along with information about which customer ID made the order (nothing personally identifiable) You add Littledata's actions to your Flow Every time the order or customer event is triggered, even for offline events, the event is linked back to Google Analytics In Google Analytics you can then: Segment the customer base to see if these actions influence purchasing behaviour Visualise when these events occurred Analyse the customers making these actions: which geography, which browser, which marketing channel (in GA 360) Export the audience to retarget in Google Ads (in GA 360) Export the audience to run a website personalisation for using Google Optimize How do you set the actions up in Flow? Google Analytics customer event – can be used with any customer triggers, such as Customer Created Google Analytics order event – can be used with any order triggers such as Order Fulfilled, Order Paid, How else could I use the events? You can now link any of your favourite Shopify Apps with Flow connectors into Google Analytics. Some examples would be: Analyse if adding a product review leads to higher lifetime value    Retarget in Google Ads after a customer's order is fulfilled   Set up a landing-page personalisation for loyal customers (using Loyalty Lion connector) How much does this cost? The Flow connectors are included as part of Littledata’s standard subscription plans. You’ll need Littledata’s app to be installed and connected to link the events back to a customer – and to get reliable data for pre-order customer behaviour. [subscribe] Can Littledata set up a flow for a specific app? Our Enterprise Plans offer account management to help you configure the Littledata Shopify connection, including the Shopify Flow connectors. Get in touch if you have a specific app you'll like to make this work with.  

2018-12-17

How to stop Google Tag Manager being hacked

In two high-profile data breaches this year – at Ticketmaster and British Airways – over half a million credit cards were stolen via a compromised script inserted on the payment pages. Google Tag Manager is a powerful tool which enables you to insert any script you want onto pages of your website, but that power can used against you by hackers if you're not careful – and below we’ll look at how to stop GTM being a security risk on your payment pages. Firstly, how did the hackers get the card details from these sites? And how is it relevant to GTM on your site? Security firm RiskIQ has traced the breach to a compromised Javascript file which skimmed the card details from the payment form. So when a user entered their credit card number and security code on BritishAirways.com (or their mobile app) those details were posted to a third party server, unknown to British Airways or the customer. This is a high-scale equivalent of placing a skimming devices on an ATM, which reads one card at a time. In Ticketmaster’s hack the script was one loaded from a chatbot vendor on their site, Inbenta. Inbenta claims not even to have been aware the script was used on payment pages. The changes to the script were subtle: not breaking any functionality, and in BA’s case using a domain ‘baway.com’ which looked somewhat authentic. To protect your site against a similar attack you obviously need to lock down accounts used by your developers to change scripts in the page source code, but you also need to secure GTM – which can be used to deploy such scripts. We have a few rules at Littledata to help reduce risks in using tag management on payment pages: 1. Use pixels over custom JavaScript tags on payment pages You probably need a few standard tags, such as Google Analytics, on payment pages but try to avoid any custom scripts which could possibly skim card details. Many non-standard tags use JavaScript only to create the URL of a tracking pixel – and it is much safer (and faster) to call the tracking pixel directly. Contact the vendor to find out how. (Littledata's Shopify app even removes the need to have any script on the payment pages, by hooking into the order as it's registered on Shopify's servers) 2. Avoid loading external JavaScript files in GTM Many vendors want you to load a file from their server (e.g. myvendor.com/tracking.js) from GTM, so they can update the tracking code whenever they want. This is flexible for them, but risky for you. If the vendor gets hacked (e.g. with Inbenta above) then you get compromised. It’s less risky to embed that script directly in GTM, and control version changes from there (although a fraction slower to load the page). Of particular risk is embedding a tag manager within a tag manager – where you are giving the third party rights to publish any other scripts within the one tag. Don’t do that! [subscribe] 3. Lock down Edit and Publish rights on GTM Your organisation probably has a high turnover of contract web developers and agencies, so have you checked that only the current staff or agencies have permission to edit and publish? It's OK to have external editors use 'workspaces' for version control in GTM, but ideally someone with direct accountability to your company should check and Publish. 4. Blacklist custom JavaScript tag on the payment pages You can set a blacklist from the on-page data layer to prevent certain types of tags being deployed on the payment pages. If you have a GTM container with many users, this may be more practical that step 3. 5. Remove tags from old vendors There are many thousands of marketing tools out there, and your company has probably tried a few. Do you remove all the tags from vendors when you stop working with them? These are most at risk of being hacked. At Littledata we run a quarterly process for marketing stakeholders opt-in tags they still need for tracking or optimisation. 6. Ensure all custom JavaScript tags are reviewed by a developer before publishing It can be hard to review minimised JavaScript libraries, but worth it for payment pages if you can’t follow rules 1 and 2. If you’re still worried, you can audit the actual network requests sent from payment pages. For example, in Chrome developer tools, in the 'Network' tab, you can inspect what requests sent out by the browser and to what servers. It’s easy for malicious code to hide in the patchwork of JavaScript that powers most modern web experiences, but what is harder to hide is the network requests made from the browser to external servers (i.e. to post the stolen card information out). This request to Google Analytics is fine, but if the domain of a request is dubious, look it up or ask around the team. Good luck, and keep safe with GTM!

2018-11-24

Are you looking at the wrong Black Friday metrics?

Paying attention to the right ecommerce metrics can help you establish the best customer base and shopping experience for long-term growth. But many retailers still focus only on the most popular metrics -- especially during the online shopping craze of Black Friday and Cyber Monday (#BFCM). Over the next few weeks ecommerce managers will be obsessing over data, but which stats are the most important? Two popular metrics -- ecommerce conversion rate and average time on site -- may be misleading, so I recommend looking instead at longer-term benchmarks. Here's how it all breaks down. Littledata's ecommerce benchmark data now contains indicators from over 12,000 sites, making it an ideal place to get a realistic view of Black Friday stats. Last year we found that the impact on Black Friday and Cyber Monday was larger in 2017 than in 2016. Using that same data set of 440 high-traffic sites, I dove into the numbers to see how this affected other metrics. Metrics to avoid I think that overall ecommerce conversion rate is a bad metric to track. From the leading ecommerce websites we surveyed, the median increase was 30% during the BFCM event last year...but nearly a third of the stores saw their conversion rate dip as the extra traffic didn’t purchase, with this group seeing a median 26% drop. Some stores do extremely well with deals: four sites from our survey had more than a 15-fold increase in ecommerce conversion rate during BFCM, and nearly a quarter saw more than double the conversion rate over the period. But the real question is: will tracking conversion rate hour-by-hour help you improve it? What could you possibly change within in day? Another misleading metric is average time on site. You may be looking for signs that the the extra traffic on the holiday weekend is engaging, but this is not the one to watch. The time on site for visitors who only see one page will be zero, which will mask any real increase from engaged visitors. Where to focus instead Now, do you know what good performance on funnel conversion metrics would look like for your sector? If not, have a look at Littledata’s industry benchmarks which now cover over 500 global sectors. Littledata’s benchmarks also include historic charts to show you how metrics such as add-to-cart rate vary for the average retailer in your sector month by month. Next try the ‘speed’ performance page to see how fast a user would expect a site in your sector to be. If you see site speed (as measured in Google Analytics) drop below average during Black Friday trading it’s time to pick up the phone to your web host or web operations team. Then, are you tracking return on adverting spend for extra Facebook Ads you're running during the quarter? Ad costs will spike during the peak trading period, and you make not be getting the same volume of traffic conversion into sales. Here are some quick pointers. Facebook Ads. Littledata’s Facebook Ads connection will ensure accurate data, with a dedicated Facebook report pack for automated insights. Shopify. If you're running your site on the Shopify platform, read up on which metrics are most important for Shopify stores and check out Shopify's BFCM Toolbox for seasonal online marketing. Missions. Use Missions in the Littledata app to make permanent improvements to your user experience. BFCM may be over before you can make the changes, but customers will keep buying the rest of the year. For example, can you increase add-to-cart rate with tips such as highlighting faster selling items or recommending an alternative to out-of-stock products? So focus on some clearer metrics and I hope Black Friday brings you every success! [subscribe]

2018-11-19

Get the Littledata analytics app

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

Sign up