Our website will undergo scheduled maintenance on 12th and 13th December. During this period, you will be unable to access our website. We apologise for any inconvenience and appreciate your understanding.

First steps to setting up Google Analytics for your ecommerce business

Google Analytics is an invaluable tool for ecommerce businesses. The data it provides can give you critical insight into which marketing channels are driving sales and even how you could improve online conversions in your shop.

Guide

16 min read

If you have an online shop it is important that you add Google Analytics and start using some of the advanced features to make the most of your data. In this guide, we will take you through the first steps in setting up Google Analytics for your online shop and some of the key features you should use from the start.

Please note that Google recently launched a new version of Google Analytics called Google Analytics 4. At the time of writing (25/5/21), most ecommerce platforms (such as Shopify), do not yet support Google Analytics 4 properties in their built-in integration, therefore this guide is currently geared to Universal Analytics properties. To find out more about Google Analytics 4, read our article “What is Google Analytics 4 and what are my next steps?”

1. Why is Google Analytics data important?

Data is the driving force behind many successful ecommerce businesses. Making informed decisions on where to focus your time and money will contribute to ecommerce growth. Just as your sales data informs key decisions on which products to stock (and when) and how to price them, website analytics data should inform decisions about your marketing activity and your onsite user experience.

With an online shop, customers are only a click away from an abandoned shopping cart or leaving to go to one of your competitors.

To generate sales, you need to:

  • drive the right people to your shop (in a cost effective way)
  • persuade them to buy (with the right messaging, products and price points)
  • make the user experience as slick as possible (to maximise conversions and minimise abandonment)

The good news is that Google Analytics can provide you with the data you need to:

  • understand what is working or not working on your site, so you can make informed decisions on where to spend your marketing budget
  • learn what types of messaging to use and improvements to increase online sales

2. A reminder - what is Google Analytics?

Google Analytics is a free website analytics platform from Google, that tracks the online activity of visitors to your website or online shop. It works by adding snippets of JavaScript tracking code into the backend of your site. You can then view reports on your site visitors and their onsite activity within your Google Analytics account.

3. Deciding what to track

To get the most from the tool, it is important to focus on tracking and analysing the data that is most closely related to your sales.

The key data to look at, is the data that delivers actionable insights about your users, your online sales and your marketing sources.

Below we outline the key areas to focus on and questions to answer.

User profile and onsite activity

Firstly, you need to collect and analyse data about your users. You need to understand who your current visitors are, and whether they line up with your target audience. You also need to understand what these visitors are doing on your site - are they interacting in the way you need them to? And if not why not?

Key areas to investigate are:

  • Traffic volume: How much traffic is entering your site?
  • Geographic location: Which locations are your traffic coming from?
  • Top viewed pages: What pages are visitors viewing most on your site?
  • User journeys: What journeys are users taking through your site?
  • Landing pages: What pages are users entering your site on?
Online sales and conversions

One of the ways that Google Analytics can deliver the most value, is in helping you understand how to increase conversions within your online shop. (Your conversion rate is one of the most important metrics in your arsenal - this is the percentage of visitors who complete a purchase).

The factors that influence conversion rate are wide ranging (including fundamental factors such as the relevance of your traffic, your products themselves, delivery options, pricing, etc.).

However, conversion rate is also impacted by the content and layout of your site - your product shots, your sales messaging, the user experience and the strength of your calls to action. Your Google Analytics data can give actionable insights into what your onsite ‘roadblocks to conversion’ are, which can help you try to fix them.

Key areas to investigate are:

  • Transactions and revenue: How many transactions have been made on the site and how much revenue has this driven?
  • Ecommerce conversion rate: What percentage of total visitors are currently converting into sales?
  • Goal conversion rate: What percentage of visitors are completing other non-purchase goals (such as newsletter sign ups)?
  • Checkout process and goal funnels: What is the drop off rate between the stages of your checkout process?
Traffic sources

Another important area of data, when looking to maximise the performance of your marketing and improve your onsite conversions, is your customer acquisition channels - the traffic sources that drive users to your site. This can help you understand which channels are currently driving the most traffic (e.g. organic search, social platforms, directly from the browser bar, etc.) and also - most importantly - which channels are driving (or not driving) your sales.

As you grow your business and if you decide to run any advertising campaigns, these reports will become critical in determining where you should spend your advertising budget.

They can give you great insight into the effectiveness of your ad campaigns at driving traffic, how traffic from those campaigns converted on the site, what your cost per customer acquisition is for each channel, and where the channel fits in your consumer lifecycle. For example, some channels are better at building awareness, so will attract customers at earlier stages of their buyer-journey so won’t have instant conversions, but may lead to conversions eventually. It is important that you look at each channel in its place, and set your goals and targets accordingly.

Key areas to investigate are:

  • Traffic driving channels: Which channels are driving the most traffic?
  • Sales driving channels: Which channels are driving the highest volume of sales?
  • Ecommerce conversion rate: Which channel has the highest conversion rate to sales (the ratio of sales to users)?

4. Getting started with your tracking

Now you know more about what data to focus on, it is important to set up your Google Analytics account to ensure that you get trustworthy data. Without any customisation, Google Analytics is relatively easy to set up, however it is important that you install the tracking correctly and make use of some of the enhanced features on offer.

Below we have outlined the some of the key steps you need to take to get your Analytics up and running and recording valuable, actionable data.

Step 1 - Set up your Google Analytics account and property

First create a Google Analytics account (if you don’t already have one) and a new property within this account to track your website.

Note that the default option in Google Analytics is for all new properties to be a new-style Google Analytics 4 (GA4) property. In this example we will be creating both a default GA4 property, and a Universal Analytics property.

  • Go to Google Analytics
  • Sign in with your Google account login if you have one (i.e. the login that you use with other google products such as Google Ads)
  • If you don’t have a Google account, create one by following the instructions on screen. (Note, you can create an account with an existing email address, just click ‘use my current email address instead’)
  • Once you have signed in, click ‘start measuring’
  • Name your account (usually your business or website name)
  • Decide how you want to share your data with other Google products and the implications of this and select your ‘account data sharing settings’ (see this Google help article for more information)
  • Click next to be taken onto the next step - creating a ‘property’ (this will create both a GA4 and a Universal Analytics property)
  • Name your property (e.g. your website name)
  • Select the same reporting time zone and currency as your online shop (e.g. ‘United Kingdom’, ‘GMT’ and ‘British Pound GBP £’)
  • Click ‘show advanced options’ to give you the option of creating a universal analytics property
  • Set ‘create a universal analytics property’ to ‘on’
  • Add your website URL (your top level domain such as www.mysite.com)
  • Check the box next to ‘Create both a Google Analytics 4 and a Universal Analytics property
  • Enter the information that best matches your business
  • Click ‘Create’
  • Read and Accept the terms and conditions then click ‘I agree’
Step 2 - Add tracking script

Once you have created your account, you need to add the tracking script to the back-end of your site. The way that you do this will depend on how your site was built.

To get your tracking code:

  • In your GA account, close down the pop-up with the GA4 tagging information and navigate to your new Universal Analytics property in the ‘property’ dropdown
  • In the property column click ‘tracking info’ > ‘tracking code’
  • This will give you your Google Analytics tracking ID (which will look like UA-xxxxxxxxx-x) and the code snippets to be added to every page of your site.

To add your tracking code:

  • If your site has been built on a platform such as Shopify, Squarespace or WooCommerce for WordPress, there will likely be an inbuilt integration. These built in integrations mean that you can add the tracking code to your site from within your web builder platform - usually by enabling Google Analytics and adding your GA tracking ID. The exact steps for this will vary depending on which platform your site is built on, so follow the instructions on linking Google Analytics from within your provider’s help section.
  • If your site was built by a developer and you do not have access to either the platform or the back end, you will need to contact your developer and arrange for them to install your Google Analytics.
  • If you did not use a website builder but are confident that you can add the code yourself, follow these instructions from Google on how to add the tracking code to your site
  • If you have Google Tag Manager installed on your site you can use that to add the tag
Step 3 - Add enhanced ecommerce tracking

Ecommerce tracking is a key feature to add to your new property, enabling you to track purchases within your Google Analytics reports. There are two options for tracking ecommerce data within your GA - the basic ‘ecommerce tracking’ and the updated ‘enhanced ecommerce tracking’.

While both allow you to track completed purchases with your GA account, the enhanced tracking gives you even more insight into shopper behaviour both before and after purchase.

If your online shop is built with Shopify, WooCommerce or Magento, enhanced ecommerce is supported by built-in integration, so it is very simple to add to your site (follow the instructions in your provider’s help section). However, if your shop is not built on one of these platforms, you will likely need the help of a developer to add the enhanced tracking to your site, as it does require more technical knowledge to be coded-in correctly. If this is not possible, the basic ecommerce tracking may be an easier option (although you may still require developer support).

To be able to use either version of ecommerce tracking, you need to enable them within your Google Analytics account:

  • Go to the admin section of your GA account.
  • In the ‘view’ column click “ecommerce settings”
  • Set both “Enable Ecommerce” and “Enhanced Ecommerce Reporting” option to ‘on’ and click save

For more information on enhanced ecommerce see Google help center.

Step 4 - Add a referral exclusion list

Sometimes in a shop’s user journey, site users will get passed to a third party website, and back again (such as with a payment gateway like PayPal). If left to its own devices, Google Analytics would treat these returning visitors as brand new, triggering a new session, and losing all of the data associated with the rest of the visit - including the original traffic source. This means that you could see that almost all of your converting traffic is driven by the referring site ‘PayPal’- which is not at all helpful, as you then lose sight of which ad or email or other source really drove the sale, impacting your marketing channel ROI calculations!

However thankfully there is a way to minimise this, and that is by adding all of these third party domains to the ‘referral exclusion list’. This is a setting with GA that allows you to add a list of domains that you do not want to be treated as a new session. (Note, when you set up a Universal Analytics property, your main domain should be automatically set as a referral exclusion to try to avoid any self-referrals).

To create your referral exclusion list:

  • Go to ‘admin’ within your Google Analytics account
  • In the property column, click on ‘Tracking info’ > ‘Referral exclusion list’
  • Click ‘add referral exclusion’ and in the box add the domain you want to exclude, and click ‘create’
  • Consider adding:
    o Your own domain - e.g. Yoursite.com (if it is not automatically added)
    o All payment gateways you use e.g. paypal.com, pay.google.com, etc.
    o Your ecommerce platform URL - e.g. yoursite.shopify.com or youruniquedomainid.squarespace.com
    o Any platform specific payment domains e.g. shop.app, checkout.shopify.com, pay.yourplatform.com etc.
    o Plus, any other third party domains that should be excluded as they are part of your user journey
  • Check for any others you may have missed within your GA reports within the ‘Acquisition’ > ‘all traffic’ > ‘referrals’ report
Step 5 - Set up goals and funnels

Another important step during your Google Analytics set-up is the creation of goals within your Google Analytics account. Goals allow you to track completed actions on your site - such as completed purchases, newsletter subscriptions, competition entries etc. Make sure to set up a goal for all of the actions that users can complete on your site that marks intent and where they have given you something - whether that be money, their contact details, etc.

Similar to your ecommerce tracking, goals allow you to see conversion rates against traffic sources and pages. With goals, you can also set funnels - this allows you to see the steps that users take to complete this goal, and lets you see the drop off between each step.

The steps to create your goal will vary depending on the way your site is built, what platform you use and the goal you want to track. Refer to your ecommerce platform’s help section for specific details on adding goals for your checkout process.

Here is an example of the steps to setting up a goal and funnel:

  • In your Google Analytics account go to ‘admin’ and in the ‘view’ column click ‘Goals’
  • Click the “+New Goal” button
  • Tick ‘custom’ then ‘continue’
  • In the goal description give your goal a descriptive name (e.g. ‘completed purchase’ or ‘sign up’)
  • Select ‘destination’ and click ‘continue’
  • Select ‘equals to’ in the dropdown and add the completion URL or your chosen action (i.e. the URL of the thank you page or the purchase confirmation page of a sale)
  • o E.g. /sign-up/thank-you, /checkout/thankyou, etc. (consult your ecommerce platform’s help section to check the URL if needed)

For more information on setting goals and funnels in Google Analytics see Google Analytics help.

Step 6 - Link your Google search tools

In order to collect more data about your organic search traffic and any PPC ads you are running, Google Analytics links easily with other Google tools - including Search Console and Google Ads. Linking your search console property and your Google Ads account allows you access to additional reports in Google Analytics which give you more information about your SEO and PPC traffic and how they interact with your site.

Link search console with Google Analytics

If you will be carrying out SEO on your online shop to try to boost your organic rankings, you should set up Search Console for your site - using the same email that you used to set up your Google Analytics account.

Search Console is a free service from Google that provides tools and information to better understand how your site ranks on Google search. Find out how to set up and verify Search Console here.

Once set up and verified, to link Search Console with Google Analytics:

  • In Google Analytics click on ‘Admin’, then ‘property settings’ in the property column.
  • Scroll down to the Search Console section and click ‘Adjust Search Console’
  • Your URL should appear on the next page (if you set up and verified your search console with the same email address you use to login to Google Analytics)
  • Select the ‘view’ you want to activate it for
  • Click ‘Save’

Link Google Ads with Google Analytics

Google Ads is Google’s advertising platform that allows advertisers to run Pay Per Click advertising (the sponsored results on Google search) and Display ads (which run on websites on Google’s Advertising Network). PPC ads can be an excellent way for ecommerce businesses to drive relevant traffic to their online shop, however, to get the most from this channel, you have to understand how your ads are performing and how to make the most from your spend. As mentioned, one of the most effective ways of analysing your PPC and display ad performance is to track them in your Google Analytics account.

If you are using Google Ads, here are the steps to link your Ads account to Google Analytics:

  • In Google Analytics click on ‘Admin’,
  • Click on ‘Google Ads linking’ in the property column.
  • Select the ads account that you want to link and click ‘continue’
    o Note - you must have admin access to the Ads account to be able to link them

For more information about how to link Google Ads with Analytics, see Google Analytics help.

Step 7 - Track inbound traffic

Google Analytics can track some traffic sources as standard. These are direct traffic, traffic from referring sites, Organic search traffic, and Google paid traffic (CPC). However, if you are running any digital ads (like Facebook ads), email campaigns, or use images to link to your site, you will need to add some additional tracking parameters to your URLs, to enable Google Analytics to identify where they came from.

There parameters are called UTM codes - strings of text that can be added to the end of a URL linking in to your site. You can alter the elements of this text to give specific details about the traffic source (such as the content of the ad, the platform, the campaign, etc.). If you do not use utm tracking codes, all traffic from these sources will be tracked as ‘direct’, so you won’t be able to identify which traffic came from your emails or Facebook ads.

Note that some email tools automatically tag the links to your site from within emails with additional tracking code if told to do so via a setting in the tool. If so, this is great, and you don’t need to add anything else. However, some email tools do not, so check out your email platform’s help section for more information.

To create utm tracking:

  • Go to Google’s Campaign URL Builder
  • Add the full URL of the page that you’re landing on the ad or email on
  • Fill in the parameters that will be added to the URL, which will tell Google Analytics about this traffic source
  • You must add these 3 parameters:
    o campaign source: to identify which individual site, content or platform this traffic is coming from, e.g. ‘Facebook’
    o campaign medium: to identify the type of channel this is e.g. ‘social-ad’ or ‘email’, etc.
    o campaign name: to identify the specific campaign or promotion, e.g. ‘summer21-sale’, ‘pre-launch’, etc.
  • If you need to add more information you can also add ‘campaign term’ and ‘campaign content’
  • Top tips:
    o make sure that these parameters make sense to you, as they will appear in your Google Analytics reports
    o Name your mediums consistently (i.e. if you set your Facebook ads medium as ‘social-ads’, do this for all social ads moving forward to avoid confusing reports)
    o Use all lowercase to keep consistency
    o Use a ‘-’ instead of a space between words
  • Once you have entered your parameters, you will see your tracked URL at the bottom of the page, and it will have been appended with a string of text, beginning “?utm_source=” (or “&utm_source= if your landing page URL already contains a ‘?’)
  • Copy the URL at the bottom of the tool and use this as the landing URL in your ad or email
  • For more information about utm tracking see this Google Analytics help article.
Step 8 - Understand PII, privacy and GDPR

When you track users on your website using JavaScript cookies and tracking code as you do with Google Analytics, it is essential that you understand your legal obligations and consumers’ protected rights. This is particularly true for ecommerce websites. This can be a complex area and is worth taking the time to get right. For example, you must gain consent to track users and you must ensure that you are GDPR compliant and follow all privacy and data protection regulations. You can find out more on the Information Commissioner’s Office website and also in this ecommerce guide.

When using Google Analytics you must also ensure that you do not collect any personally identifiable information (PII) within your GA reports such as credit card details, address, email address, names, etc. - which you could inadvertently do when you implement Google Analytics, depending on your shop’s set up. To understand more about this and how to avoid it see Google’s help information.

5. Further support

As data is so integral to ecommerce businesses, it is important that you take the time to learn how to use Google Analytics. The tool itself is relatively user-friendly but it can take some time to find your way around and to understand what all of the different reports tell you.

Although in this guide we have highlighted the steps you need to take to get started and some of the key features to use first, Google Analytics is a powerful tool with a wide range of features for more advanced analysis. We recommend that you familiarize yourself more with the day to day working of Google Analytics and some of its more advanced features to make sure you get the most from your data.

For further advice and support on all aspects of your digital marketing, processes & platforms check out our DigitalBoost programme. Offering free 1:1 consultancy, online resources, training and webinars to help businesses in Scotland develop and grow.

Want to speak with your nearest Business Gateway team?

Your local Business Gateway can offer you free 1:1 advice and online support to help you with anything to do with your business or if you are just thinking about starting up then we can support you with that too.

Fill in the form below and we will get back to you to help.

1. Tell us a bit about your business or idea (such as, sector, stage…) 2. What are your main reasons for contacting us today? 3. Is there anything else we need to know before we contact you?

Enter your postcode

How we use your data

We will use the information you provide to respond to your request, and to provide business advice and support services to you. For more information please view our privacy notice.

You might also be interested in

Artificial Intelligence (AI) – the basics

Discover how AI, particularly Generative AI like ChatGPT, can revolutionise small business operations, from marketing strategies to content creation. Explore its basics, applications, ethical considerations, and practical tips for leveraging its potential.

Pre-launching a new product or business

Many business owners work for months or even years to reach the point they’re finally ready to launch their new business or product, and then suddenly realise they have no clear plan on how to reach people who are ready to hear about it. This is where a pre-launch comes in!

An introduction to social commerce

Social commerce enables businesses to use social platforms to showcase and sell their products and services. Find out what options are available and how to get started.