Google Analytics Goals and Funnels
It's very possible — and straightforward — to define goals and funnels in your Google Analytics account for your Shopify website.
- 1. What is a goal? What is a funnel?
- 2. Requirements
- 3. Important note on pageTracker._trackPageview
- 4. Learn by example: setting up a Goal with a Funnel
1. What is a goal? What is a funnel?
A goal is typically a website page that provides you with climaxing joy when it is visited by your customers. For most, the ultimate goal page is the checkout Thank you page. When your customers land on that page, it means they've bought something from you. Another goal example would be the static Thank You page you've set for a newsletter subscription.
A funnel represents the path that you expect visitors to take on their way to 'converting' to your goal. A funnel is defined for a goal. Defining the pages for a funnel allows you to see how frequently visitors abandon goals, when they join in on the path to your goal, when they drop off the path, etc.
Have a Google account.
Using that Google account, sign up to get a Google Analytics account.
Add your Shopify site to your Google Analytics account.
Set up Google Analytics to work with your Shopify site. Instructions for this can be found here.
Patience is also required. Once you've finished editing your Goal and its (optional) Funnel, you'll have wait 24 hours before you see any data collected.
You have to let Shopify add the Google Analytics code to your Shopify pages for you, don't add the code to your theme.liquid file. Do this according to step 7 of The Google Analytics setup guide.
3. Important note on pageTracker._trackPageview
To determine yourself, by inspection, which URL Shopify provides to Google for a specific checkout page, do a View Source on said page in your browser. Look near the end of your document. For example, on page 1 of checkout, you'll see this:
This means that Shopify is telling Google that the URL of this page is /checkout/carts/show.
4. Learn by example: setting up a Goal with a Funnel
So you've got a product page and want to analyse traffic from that page all the way to the Thank-You page (indicating a successful order).
On your Google Analytics home page, at https://www.google.com/analytics/settings/home click the Admin button:
Goals are set at the view level. To find a view, select an account, property, and a view. Then click Goals.
Click Create a Goal
This brings you to a form where you'll fill out your goal information in 3 steps:
Set up your Goal
1. Goal Setup
Under the templates section, select the option for Make a payment
Click Next Step
2. Goal Description
Edit the Name (optional) or leave it as "Make a payment".
For the Type field, ensure Destination is selected.
Click Next step.
3. Goal Details
- For the Destination select "Equals to" and enter the following URL:
Leave the Case sensitive box unchecked.
Click the button below Funnel to activate it.
Set up your Funnel
Now you can add the steps of the funnel to be tracked. Follow the format of the table below:
|2.||add the product to their cart||/cart|
|3.||give us their address||/checkout/carts/show|
|4.||give us their billing info||/checkout/orders/pay|
Replace the name and Screen/Page URL of Step 1 with the URL of your product page. It's fine to leave the Required settings to No since there are variaous paths shoppers can take to get to your cart, or the checkout page (e.g. cart permalinks).
- Click Create Goal