If you’re selling online, tracking your sales data is a must. In this video, I’m going to show you how to integrate with Google Analytics for Google Ecommerce Tracking. By the end, you’ll be able to send sales data from your order forms to your thank you pages and record it all in Google Analytics Ecommerce Tracking.
First, let me clarify what this all means and why it matters to your business.
Google Ecommerce Tracking lets you analyze sales activity on your site. It gives you all kinds of data about your product and transaction details, average order value, ecommerce conversion rates, time to purchase and more.
Plus, Google Analytics integrates seamlessly with Google’s AdWords platform — which makes it easy to measure the ROI of your paid search advertisements. It’s a win-win!
You might already be familiar with this stuff. But the big takeaway here is that when you collect this information, you can make more informed decisions in your business.
So you’ll want to set up this kind of tracking on your sales pages as soon as you can — even if you aren’t quite ready to put the data into action yet. This type of data is not retroactive, which means you won’t be able to go back and send Google old sales data after the sale is made.
Quick tip: You can also check out our “Deep funnel conversions” video to see how to send conversion data to Google that ISN’T related to actual purchases, but other conversions like opt-ins, trials, and so on. This is a bit different, and It’s a little more in-depth, but totally worth your time.
Alright — back to Google Analytics. I’m going to be honest, this is a bit of a technical setup. If you aren’t comfortable with it, you may want to get some outside help. But for those of you who are into it, I’ll walk you through three steps to add code to your site so you can collect and store ecommerce data:
First, you’ll create a property in Google Analytics and add your global site tag to your pages. I'll explain more about what that means in a minute.
Then, you’ll set up your Ontraport order forms.
And finally, you’ll configure your thank you page.
Ready? Let’s hop in.
The first thing you’ll need to do is create a property and add your global site tag to your pages. A property is a website or mobile app associated with a unique tracking ID. Once you do these things, you’ll have basic tracking on your site. Even if you’re not yet ready to run ads — or even sell products — you still want Google’s tracking script on your pages.
Why? It’ll make your life so much easier when you ARE ready to run ads, because you’ll have a complete history of your page’s tracking. You can use that information to create data-driven ads that actually get results.
Start by signing in to your Google Analytics account. Make sure the currency you set in Google is the same as in Ontraport.
If you don’t already have a Google Analytics account, or if you aren’t quite sure what it is, you’ve got a bit of homework to do! Luckily, Google has some awesome training and documentation to help you get started. So if you need to brush up on that stuff, go ahead and pause this video to check out their resources below. When you’re ready, come back here and let’s get crackin’.
Inside Google Analytics, create a property for each website you want to collect data from. Doing this will generate a unique Tracking ID and global site tag with the Tracking ID for that specific property.
Now, copy your Tracking ID number and save it — you’ll need to use this later.
Hot tip: Since Google switches up their navigation a lot, see their documentation in the resources below for where to go to get your Tracking ID and global site tag.
After you save your Tracking ID number, go back and copy your global site tag as well.
Then, pop back into Ontraport to paste that global site tag on every single page you want to track, right after the opening “head” tag. To do this, go to a page and click the “settings” tab. Then click “Custom Code” and drop your site tag right here in the header section.
If you use a third-party shopping cart, you’ll also need to set up cross-domain tracking. I won’t cover that in this video, but we’ve provided a link for a resource that will walk you through the process.
At this point, you’ve created your property and all your pages should have a global site tag. Now let’s move on to step 2 and set up your Ontraport order forms.
Go back to your Ontraport account and find your order page.
Open up your form settings and scroll down to the “Advanced” section. Check the checkbox that says, “Send Google Ecommerce Tracking parameters to landing/thank you page.”
Then save your settings and publish. Easy peasy.
You’re already at the final step! All you have to do now is configure your thank you page to send your sales data back to Google.
Go to your form’s thank you page. You’ll need to grab Ontraport’s sample script, which you can find in GitHub; see the link below. It’ll look something like this, and you can snag the sample script by copying this “minified version” here.
Okay, back to Ontraport.
Remember that Tracking ID you saved in step 1? It’s time to use it! Add your Google Analytics ID number right here.
Now save your settings and publish your page. You’ll need to wait 24 hours for the data to populate in Google Analytics. Then you can test out your new script.
To do that, just fill out your form yourself and check to see if your information shows up in Google. You could also run your transaction on a dummy gateway, if you don’t want to process a real transaction for your test.
And there you have it! You just set up Google tracking on your pages and can start sending your ecommerce data over to Google. Now you’re ready to collect crucial sales insights, like your average order value and the length of your sales cycle.
So give yourself a pat on the back, because you’re already on top of it! If you’re ready to take it a step further, buckle up and watch “Deep funnel conversion tracking.”