The Beginner’s Guide to Google Analytics for eCommerce

Google Analytics is an essential tool for your eCommerce store. It will allow you to better understand your visitors and customers so you can improve your traffic and revenue.


Google Analytics对电商网站来说,可以让你更深入了解访客、会员,这样你可以优化流量,提高

If you did not set up your tracking correctly, then you’re shooting in the dark – you’ll never know whether you’ve hit or missed.


Learning how to use the full potential of Google Analytics for your eCommerce site will make a huge difference in the growth of your business. Unfortunately, it will take some time to master it.


但是,GA 和网站是2个独立系统,需要把网站数据发送到GA服务器,


That‘s why we decided to explain the fundamentals to you, to help you to speed up your process.

How does Google Analytics work?


To collect information from websites, Google Analytics uses a small piece of JavaScript code integrated into the HTML.


When the user arrives at your site, this JavaScript code will began to collect various pieces of information about how he engages with the website – things like:

  • The URL of the page the user is viewing.
  • Browser and technical data (language set-up, device type, operating system, etc.).
  • Referring traffic sources.

What kind of data can you track with Google Analytics?


With every analytics tool you’ll find two types of data:


1. Dimensions: These are characteristics of the users, their sessions, and their actions.


Some examples for dimensions are: 

  • Geographic location(哪里人,兴趣、爱好,收入,种族) for users
  • Traffic source(流量来源,来自sns,email,自然搜索,cpc等) for sessions
  • Name of the page(浏览页面) viewed by user for actions

2. Metrics: These are quantitative data of users, sessions and actions. They are actual numbers.


Some examples of metrics are:


  • Total number of visitors (访客数量,不是人数,这是受众指标)as an Audience metric.
  • Average number of pages/visits (PV,人均访问页面数量,行为指标)as a Behavior metric.
  • A purchase(订单数量) as a Conversion metric.

In general, you’ll be able to collect the following data from Google Analytics:

以上是例子,通过GA你可以收集如下数据,人过留声 雁过留痕

  • Session or visit – user interactions with your site: stops when user has been inactive for 30 minutes. You can extend that for more than 30 minutes for video-streaming sites.
  • Page view – counts every time a page is viewed on your site.
  • Event – actions carried out by the user such as watching a video, or email sign up. This requires additional customization to be able to track it. Once a user does not generate an event in more than 30 minutes, this session will expire.
  • Visit duration – the time from the first page visit to the last page visit
  • Pages/session – the number of pages visited by a single person during the particular session
  • New vs. returning visitors – the percentage of new and returning visitors
  • Bounce rate – the percentage of users who visit only one page of your website and leave without browsing further. (This means that you’re probably setting up wrong expectations for users on the site.)
  • Exit rate – the percentage of users who leave at a particular page of your site.
  • Conversion rate – the percentage of users who purchase or complete an action on your site.
  • Transactions – the total number of complete purchases on your site

When you open Google Analytics, you’ll see that every report contains dimensions and metrics. They are most commonly reported in a table, with the first column representing the dimensions, and the rest of the table displaying the corresponding metrics:



First let’s clarify the difference between vanity metrics and actionable data. 

Google Analytics allows you to tracks tons of metrics. Sadly, most of them don’t really matter for your business’ growth. We can separate the data we collect into two main categories:


Vanity metrics(好看不实用,但是很有满足感) – These look good on paper, but don’t really show whether your business is doing better or worse. These are things like page views, bounce rate, time on site.

数据很好看,但是无法直接展示你的收入好不好,比如page views, bounce rate, time on site.

Actionable data (与业务相关)– These are the actual metrics that matter for your business. They show you that you’re doing an amazing job and that you need to go in the same direction. Some great examples would be: active users; engagement; conversion rates; customer acquisition cost; and ultimately, revenues and profits.


比如active users; engagement; conversion rates; customer acquisition cost; and ultimately, revenues and profits.

Why is this important?


If you track only the vanity metrics, then you’ll get a false sense of success. Just because your eCommerce website has loads of traffic, this doesn’t mean you have a great business. At the end of the day, it doesn’t mean a thing if you have a low conversion rate, but only a few thousand of them become customers.

How to use Google Analytics to track and improve your online performance?

Before you start implementing Google Analytics on your site, you should take the time to create a measurement plan. By doing so you’ll know which metrics to track; why; what they mean; and how to use them to improve your business results.





To create your effective measurement plan, follow these five simple steps:

Step #1: Identify growth goals by creating your buyer personas, value proposition and business goals.



For example: The main business objective for EVO is to help people enjoy winter sports using their ski and snowboarding equipment, and thereby cultivate their love for extreme sports. They also want to increase their online sales in the upcoming months.

EVO的主要业务目标是帮助人们使用滑雪和滑雪板设备享受冬季运动,从而培养他们对极限运动的热爱。 他们还希望在未来几个月内增加在线销售额。

Step #2: Identify strategies and tactics to achieve these goals. Your plan must include both strategies (high-level plans) and tactics (specific methods) in order to guarantee success.

为实现这个目标的指导思想和工作方法 胸怀大志是不够的,还需要腹有良谋

For example: The main strategy for EVO to increase sales is to sell more ski and snowboarding equipment. They plan to do this by implementing tactics for:

例如:EVO增加销量的主要策略是销售更多滑雪和单板滑雪设备(可能他们还有很多其他产品)。 他们计划通过实施以下策略来实现这一目标:

  • increasing organic traffic with SEO.
  • 通过seo增加自然流量
  • increasing conversion rates with A/B testing.
  • 用AB测试增加转化率
  • upselling additional products at the moment of purchase. 
  • 在客户购买付款之前的那个页面增加关联产品

Step #3: Identify Key Performance Indicators (KPIs) – These are the metrics that you’re going to use on a daily business to understand how your business is performing.


EVO would be interested in tracking things like:

EVO 会跟踪以下指标

  • organic traffic.
  • conversion rate.
  • average order size.
  • number of purchases.
  • sales.

This is a list of 32 Key Performance Indicators (KPIs) you can track for Ecommerce. Choose the ones that matter for your business.

Step #4: Choose how to segment your data – Document which segments of data it’s important to measure for the success of your eCommerce business. 





For EVO this could be:

Marketing channels such as organic search:

  • New vs. returning visitors
  • People who buy specific snowboarding equipment 

Check out this post for 16 Secret Google Analytics Advanced Segments.


  • 新旧访客的比例变化,对于复购产品,如果没有回头客,不用做了
  • 购买滑雪板的客户,这类客户潜在的价值更高

Step #5: Choose targets for each KPI – This will help you understand whether your business is doing well or poorly over time. Without this information you will never know whether you’ve achieved your goals.

EVO might set the following targets:

  • 1M unique visitors from organic search
  • 1.5% conversion rate
  • $2,500 average order size

为KPI设置阶段性目标,这个阶段工作开展的效果还不好, 这样你才可以评估离成功的路还有多远

How to setup Google Analytics eCommerce tracking


To start collecting data with Google Analytics, follow these five steps:



Step #1: Create a new, or use your existing, Google account. You can create one from here if you don’t have it yet. Otherwise, log in and go to Google Analytics.

Step #2: Log in to your Google Analytics account and click on “Create new account”.

如无账号,就 “Create new account”.

Fill out the data fields, and on the next page you’ll get the tracking ID code.

tracking ID,每个网站不一样,唯一性,还有tracking ID code

Step #3: Set up tracking ID code on your site by copying and pasting your tracking ID on every single page of your eCommerce site that you’d like to track. The best location for the code is at the end of head tag.


Some eCommerce platforms like Shopify allow much easier integration: just copy and paste the JavaScript code inside the plugin/admin panel.

Shopify更简单,进入后台 Settings > General

Then paste the code into the Google Analytics field.


Step 4: Turn on the ecommerce tracking feature. For eCommerce sites you’ll need to perform one additional step to be able to track things like sales and average order size. To turn on this feature do the following:

如果是电子商务网站,要打开ecommerce tracking,这样可以追踪销售额以及订单金额

启用 eCommerce tracking

Enable eCommerce tracking within your analytics website deal.

Add your Google analytics code to your “Transaction complete” page.




Add additional eCommerce tracking code receipt pages so you can capture the deals of each transaction.

这段eCommerce tracking code 会抓取每一笔交易的数据

After this, your Google Analytics will be fully operational and you’ll start to collect data for your reports.

然后,GA就开始收集网站数据填充到你的报告了,花了多少广告费,收入多少钱;如果没有这个配置,你得把广告费做一个excel,把网站数据做另一个excel,一个一个对,把这些数据整合起来,基本上你就可以看一个GA report就对所有的业务情况了然于胸,有一个不足,客户退款退货除非你特别去处理,不然是看不到的,因为退后都在网站后台,而后台我们一般没有配置跟踪

Understanding basic reports 

All of the data tracked by Google Analytics is presented in form of reports. There are five standard ones that don’t require any customization:


Real-time – This shows real-time statistics about the people currently on your site – things like who is on your site at that very moment; where they came from; their geographic location; and what pages they’re browsing.


Real-time data is rarely useful; however, it can help you to better understand:

查看Real-time ,你可以了解

  • whether the data you’re tracking over time is correct
  • 你设置的跟踪目标,跟踪的link是否正确
  • the immediate results from your marketing campaigns.
  • 你设置的营销版块的即时效果,多少人从Google shopping进来,多少人从SNS进来
  • the results from A/B testing and multi-funnel testing within minutes.
  • 实时查看AB测试和漏斗的成效
  • the pages users are viewing at the moment, so that you can publish, adjust and modify your content in real time.
  • 用户正在查看的内容,你看到他在浏览某个页面,你也跟进,然后发现价格写错了,你赶紧修改,可以实时修正你的网站内容

For more information on this topic read the blog post 4 Ways to Harness the Power of Real-Time Analytics. 

Audience: This section has been created to help you better understand your website visitors.



By tapping into the data from this report, you’ll learn more about:

  • the demographics of your visitors (i.e. age, gender, location, language, etc.).
  • the interests of your visitors.
  • the behavior of your users (i.e. new vs. returning visitors, frequency and recency of visits, and level of engagement with your content).
  • the technology your visitors are using (i.e. browsers, operational systems, devices, etc.).
  • users’ flow (the sequence of pages people visited to complete a purchase).



The information from this report will help you to:

  • understand your customer profile better, which will result in more marketing-effective campaigns targeting them.
  • improve your logistics according to your top demographic locations.
  • adjust your website according to the technology that people use to access it (i.e. devices, browsers, etc.).
  • improve site speed depending on the locations of users.






To better understand this report, read the blog post How to Use Google Analytics Audience Data to Improve Your Marketing. 

Acquisition – This is one of the most important reports in Google Analytics. It allows you to understand engagement and sales, and which channels brought more visitors to your eCommerce business.

收益 – 这是Google Analytics中最重要的报告之一。 在这里可以看到访客参与度和销量,哪些渠道为B2C业务带来了更多访问者。





Acquisition shows Metrics (sessions, % new sessions, bounce rate, pages/sessions, transactions, revenue, eCommerce, conversion rate) for:

  • each channel (organic search, paid search, social, direct, email, etc.).
  • each traffic source page (
  • each referral (e.g. Facebook).
  • each campaign (e.g. AdWords campaign for slim jeans).
  • paid keywords that brought the most traffic to your site.
  • social channels.
  • organic search.



It will also help you understand:

  • the channels that are driving more traffic and sales.
  • the websites linking to you.

Behavior – This report allows you to understand how well your content is performing so that you can improve your SEO and conversion optimization efforts.

行为 – 此报告可让您了解内容的效果,从而改善SEO和转化优化工作。

The behavior report displays metrics for each page of your website (pageviews, unique pageviews, entrances, bounce rate, exit rate, page value).

这个报告让你看到了每个页面的如下信息(pageviews, unique pageviews, entrances, bounce rate, exit rate, page value).

You are also able to see the top landing and exit pages, to analyze average load time, and to track site search keywords and events.

你还可以看到最大流量的入口landing page和最大流量的出口页面exit page,可以优化平均加载速度,可以跟踪搜索的关键词和网站

You can use the information from this report to do the following:


  • Get keyword ideas from site search
  • 从网站的搜索框记录用户搜索的关键词,优化网站关键词
  • Analyze how landing pages are converting, and make improvements to the ones not performing well
  • 分析landing page的转化如何,对那些转化能力一般的页面进行优化
  • Analyze your exit pages and see which ones need improvements
  • 分析跳出最频繁的页面,看看哪里需要改进
  • Understand behavior flow on your site
  • 了解用户行为数据流,从大门进入穿过哪个过道,进入哪个房间;改进最频繁的数据流

To better understand this report, read this.

Conversions – To be able to use this report, you need to turn on eCommerce tracking, as we mentioned before.

转化 – 为了能够使用此报告,您需要启用电子商务跟踪,如前所述。

From Conversions you’ll be able to learn more about:



  • which products visitors buy on your site, in what quantity, and the total revenue generated by the order.
  • the revenue and number of products for each order.
  • the time and number of visits needed for the customer to complete the transaction.




This data will allow you to better understand:

  • which are the top-selling products on your site, so that you can push them more.
  • how much time people need to decide before buying your products, so that you can improve your conversion campaigns.

How to segment your data?

With segmentation you‘re filtering data in real time with the aim of isolating and comparing metrics so that you can see which segments are underperforming. It’s extremely useful for understanding your business performance, and filtering actionable take-aways.

为什么要细分,因为研究问题,解决问题不要胡子眉毛一把抓,必须深入调查 ,找出滥竽充数的南郭先生,比如跳出率是60%,根据国家细分,发现美国人跳出率是90%,而英国人是20%;再比如股市最近走势不错,细分发现大部分低迷,加入一支大股票拉高了而已

通过细分,您可以实时过滤数据,这么做的目的是过滤出一个segmentation,比较它展现出来的所有指标,以便您可以查看哪些细分市场表现不佳。 它对于深入了解您的业务,以及找出需要优化的关键点非常有用。

Segment by users – Multiple sessions within the date range you‘ve selected, such as all the goals users competed or all the revenue generated by a user.

You can compare users who made purchases to users who didn‘t make purchases. This analysis will help you understand what influences people to buy.


用户细分 – 某个日期范围内的多个会话中,例如这些用户完成的所有目标相比较,或者比较每个用户带来的所有收入。

您可以将购买的用户与未购买的用户进行比较。 此分析将帮助您了解人们购买的因素。

Segment by sessions: The data here draws the user behavior from a single session, such as goals competed during the session or the amount of revenue generated by the user during the session.


For example: you can segment sessions based on traffic source / paid search,  and compare it to organic search.

例如:您可以根据traffic source / paid search对 sessions进行细分,并将paid search与自然搜索进行比较。


  • dimensions.
  • metrics.
  • session dates.
  • user actions.

Both segments can be built on:

  • dimensions.
  • metrics.
  • session dates.
  • user actions.

When you go to Audience, you’ll see that all of the Sessions segment already applies to the Audience section, which includes all sessions within the selected date range.


Click the arrow to open up the segment builder. You’ll see a list of commonly used segments. You can compare up to four segments at any one time by clicking the segment label or dragging it into the empty fields at the top of the report. You can also remove them by clicking “x” on the already selected ones.

单击箭头以打开 segment builder。 您将看到 segments的列表。 通过单击segment label或将其拖动到报表顶部的空白区域,您可以同时最多比较四个segment。 要删除已经选择的segments,点击旁边的“x”来删除

When you’ve selected your segment, click on “Apply” at the bottom. You’ll see each of your segments represented by a time graph and a data table. Once applied, segments will show in your other reports as well.

选择segment后,点击底部的“Apply”。 您将看到每个segment由时间图和数据表表示。segment也会显示在您的其他报告中。

To create a custom segment, simply click “Create new segment”. Start by giving the segment a name, then choose your criteria from the categories on the left to filter your data.

要创建自定义细分,只需点击“Create new segment”即可。 首先为细分提供一个名称,然后从左侧的类别中选择您的条件来过滤您的数据。

For example: you can choose language from the demographics category and filter it for only those who speak Spanish. You can even create customization based on sequences of custom interaction.

例如:您可以从demographics category中选择 language ,过滤出讲西班牙语的人。 您甚至可以根据自定义交互序列创建自定义。

How to set up goals to analyze your funnel?

Goals allows you to map the data with the KPIs that you want to track. With them you can easily analyze your funnel and understand which pages are killing your conversions.

Goals可以让你考核每个环节的KPI。 您可以分析你的漏斗并了解哪些网页会影响您的转化。


Type of goals – there are four types of goals that you can create in Google Analytics:

目标类型 – 您可以在Google Analytics中创建四种类型的目标:

  • Destination (page) (Simply enter the request URI to use this.)
  • Duration (five minutes)
  • Pages/visit (three pages)
  • Events (registration) (You need to have event tracking implemented to use it.)
  • Destination (page)(只需输入请求URI即可使用此功能。)
    Events (registration) (需要配置事件跟踪才能使用。)

Specify monetary value as a goal – This will allow Google Analytics to count a goal conversion as an actual revenue.

为每个目标定义value – 这样Google Analytics将目标用货币来衡量,比如你接了30个询盘,有一个转化3000美金,询盘的value就是100美金。

Set up your conversion funnel – Design and track the actual path of all visited pages that lead to an order completion.

设置转化的漏斗 – 设计并跟踪完成订单支付之前,所有访问过的网页的实际路径。

For example: To complete a transaction the user must add items to a card, fill out shipping information, and submit payment information. Then he’ll be redirected to the Thank you page.

To build a funnel, specify all of the pages leading to the goal. You can also name each step of the funnel that will show up in your reports.

Setting up goals also activates multi-channel funnel reports displaying typical paths towards conversions.

例如:要完成交易,用户必须添加商品到购物车,填写送货信息并提交付款信息。 最后跳到 Thank you page.。

要构建漏斗,请按顺序列出达成目标路上经过的所有页面。 每个步骤你都可以重命名,这些名称会显示在reports中。

设置目标还会激活 multi-channel funnel reports这个report会显示转化的典型代表性路径。

eCommerce reporting – It tracks important sales activities and performance for your online store, such as:

电子商务报告 – 它跟踪您的在线商店的销售和整体表现,例如:

  • transactions.
  • revenue.
  • conversion rates.
  • unique purchases.
  • quantity.
  • product purchased.
  • number of times people visited before purchasing.
  • Etc.

The eCommerce reporting is very similar to the goal reporting, with one small difference – goal conversions are tracked as one per visit. Therefore, if one user buys several products per visit, it will be counted as one conversion.

eCommerce conversions are tracked multiple times per visit. If a person buys three products per visit, it will be counted as three conversions.

Remember: add goal value only for non-eCommerce activities, otherwise your revenue will be counted twice.

电子商务报告与目标报告非常相似,只有一个小差异 –  goal conversions 是根据one per visit跟踪统计。 因此,如果一个用户每次访问购买多个产品,它将被计为一次转换。

eCommerce conversions在每次访问会跟踪多次。 如果一个人每次访问购买三种产品,它将被计为三次转化。

请记住:仅为non-eCommerce 添加目标价值,否则您的收入将被计算两次。


To take your skills to the next level, we suggest you go to Google Analytics Academy and take the advanced course Ecommerce Analytics: From Data to Decisions. By doing so you will learn advanced techniques for tracking and analyzing data that will allow you to better improve your marketing efforts and sales and take them to the next level.