Setting Up Google Analytics
What We'll Cover
Google Analytics is a free analytics tool that helps you track visitors and conversions on your store. It allows you to gain further insight into your visitors, such as which pages they are visiting the most, what channels are driving the most traffic to your store, and which products are performing best.
With Google Analytics Real-Time reports, you can even see how many visitors are viewing your store at any given moment. Real-Time reports allow you to see if a current promotion is driving more traffic to your store, the effects on store traffic from social media posts, traffic driven by content changes and more, making Google Analytics virtually essential.
Our Google Analytics integration supports Enhanced Ecommerce and Site Search, and uses the Universal Analytics (UA) property.
Anyone using a Stencil or Blueprint theme can take advantage of our updated integration, but only those using Cornerstone or a theme that supports Data Tags will experience full functionality. See Requirements & Limitations to learn more.
Customers must accept cookies for analytics to work. Hiding the cookies banner via theme customization will not affect site functionality, but will not allow for analytics to run. For more information on cookie consent tracking, see our Security and Privacy Settings article.
Universal Analytics sunset: On July 1, 2023, standard Universal Analytics properties will stop processing new hits. If you’re currently using Universal Analytics, we recommend that you set up and start using Google Analytics 4. See Setting Up Google Analytics 4.
Requirements & Limitations
- Your Google account must be verified.
- Store must be using Optimized One-Page Checkout.
- Checkout Labeling in Google Analytics must match your store's checkout steps. See Setting up Google Analytics.
- Your store must have a custom domain applied.
- To get the most out of Google Analytics Enhanced Ecommerce, you must have data tags in your theme. The "Product List Performance Report" within Google Analytics requires the use of our data tag solution to collect the necessary data. Currently, the only theme that has data tags built-in is Cornerstone (2.6.0 or later). If you would like to add data tags into your theme, visit our Dev Center to learn how.
Recommended Setup
These steps will show you how to set up Google Analytics to take advantage of the features supported by our integration, and how to connect Google Analytics with your store.
Creating the Tracking ID
The steps below are for people who are new to Google Analytics. If you are already using Google Analytics, sign into the dashboard. Go to Admin and click + Create Property, then follow the prompts.
1. Create your Google Analytics account by clicking on the Start for free button. You may be prompted to log into your Google account.
2. Fill in the Account Name and configure your Account Data Sharing Settings to your preferences. Click Next.
3. Fill in the Property name, Reporting time zone, and Currency, then click Show advanced options.
4. Toggle to enable Create a Universal Analytics property and fill in the Website URL. Make sure to select "https://" from the dropdown when entering the URL.
Select whether you want to create both Google Analytics 4 and Universal Analytics properties, or simply a Universal Analytics property. If you're unsure, select Create a Universal Analytics property only. You can create a Google Analytics 4 property from the Google Analytics dashboard later on, if you change your mind.
5. Select your industry category, business size, and the outcomes you're looking to achieve from Google Analytics. Click Create once you have made your selections.
6. Check both boxes to agree to Google Analytics' Terms of Service, and click I Accept. Note that the terms of service agreement will differ, depending on your country or region.
7. Copy the tracking ID. Note that you will not need to copy any code. It will look like this:
Setting up Google Analytics
Enhanced Ecommerce
1. After creating the tracking ID, click the arrow icon to go back to the Admin area.
2. In the View column, scroll down and click on Ecommerce Settings.
3. Under Enable Ecommerce, toggle the status to ON. Next, toggle Enable Enhanced Ecommerce Reporting to ON.
4. Under Checkout Labeling, add funnel steps that match your store's checkout steps, then Save your changes. Your funnel steps should have this order:
1. Customer
2. Shipping
3. Billing
4. Payment
Site Search
Site Search is a report that can provide you with important insights on how shoppers interact with your store's search function. The data it contains can help answer the following questions:
- How frequently do shoppers use my search box?
- Where do shoppers begin searches and what do they find?
- What are shoppers looking for?
1. In your Google Analytics account, go to Admin › View Settings.
2. Under Site Search Settings, toggle site search tracking to ON. In the Query parameter, add search_query into the text box. Click Save when done.
ENABLING GOOGLE ANALYTICS TRACKING
Switching from using a manual script? If you had previously connected to Google Analytics with a manual script, be sure to move any additional scripts you have in the Tracking Code box to the Script Manager before installing your tracking ID.
Once you have successfully generated the tracking ID, it will need to be installed in your BigCommerce store.
1. In the BigCommerce control panel, go to Settings › Data solutions. Click Connect next to Google Analytics.
2. Select Property ID (recommended) from the dropdown. Paste your Property ID into the field, then click Connect.
FAQ
Can I send custom dimensions and metrics to Google Analytics?
Yes, our recommended method can send custom dimensions and metrics. See Google Analytics' developer documentation and support documentation on custom dimensions and metrics for more information.
Can I prevent transactions from payment gateways from appearing as referrals in Google Analytics?
To avoid transactions made through payment gateways such as PayPal appearing as referrals in Google Analytics, you will need to add your payment gateways to your Referral Exclusion List. Note that the method listed below will not work with Google Analytics 4, as this only works with your store's Tracking ID.
1. In your Google Analytics account, go to Admin › Property › Tracking Info › Referral Exclusion List.
2. Click Add Referral Exclusion.
3. Enter the domain of your payment gateway (such as paypal.com) in the Domain field, then click Create to save your changes.
How do I send Google Ads conversion data to my Google Analytics account?
If you have Google Ads conversion tracking set up through Ads and Listings on Google or another solution, you can enable data flow to your Google Analytics account by following the instructions in Google's support documentation.
After linking your Google Ads and Google Analytics accounts, any conversion from your ad campaigns will be marked in Google Analytics as Ads revenue instead of search-derived revenue.
Who should I contact if I have questions about Google Analytics in my store?
While our support team can assist in setting up the integration and confirming your tracking code(s), we recommend using Google Analytics Help Center and Community for additional information and troubleshooting.