This is the second installment of a collaborative series between PPC Hero and SEO Boy to help readers prepare for the Google Analytics Individual Qualification (IQ) Test. This series covers the most important aspects of the IQ Test and will prepare you to earn a high score.
While the Google Analytics test might seem daunting, I am here to say it isn’t nearly as difficult as one might think, as long as you do your homework. Yesterday, Steve covered the different types of Google Analytics cookies and how they are each used to track activity. Now that you understand how Google Analytics tracks information with a user, let’s go through how e-commerce data is passed into Google Analytics.
If your site sells any sort of products or services online, you should have e-commerce tracking in place. If not, it is time to start! E-commerce reports will allow you to track your site’s transactions, revenue, products purchased, e-commerce conversion rate, the number of times people visited your site before purchasing, etc. If you have your account synced with your Google AdWords account, you can also review revenue data by keyword to help with PPC optimizations. The e-commerce tab appears on almost every data page within Google Analytics, so you can break down revenue in just about any way imaginable.
There are three steps to e-commerce tracking:
Step 1: Enable e-commerce reporting in your website profile.
To do this, go to the edit profile information page and then choose edit in the Main Website Profile Information section. From there, change the “E-commerce Website” option to read “Yes”
Step 2: Add the Google Analytics tracking code to the receipt page.
Make sure the same Analytics code that is on the rest of the site is added onto the receipt page. You will need to make a few modifications to the code, which is covered in Step 3.
Step 3: Add tracking into the Google Analytics code, in order to correctly track each transaction.
For this, you will first use the _addTrans() method which signifies a transaction has occurred. From there you will also have to add arguments, that provide details such as order ID, total order amount, and the amount of tax charged. Your code will need to dynamically retrieve the values from your merchant software in order to populate the correct information. Below are the specific arguments to fill in, the ones with an * are required.
Order ID*, Affiliation, Total*, Tax, Shipping, City, State, Country
Let’s look at an example from the Google Analytics learning center:
The other piece shown above, is the _addItem method, which helps pass along the details on each item a visitor purchases. If they purchase more than one item, this will be called multiple times. Again, there are arguments that need to be added in order to pass along the details. The arguments with an * are required. Note that the Order ID should be the same as in _addTrans.
Order ID*, SKU/Code*, Product Name, Category, Price*, Quantity
Finally, at the end you will need to call _trackTrans() in order to send all of the information to Google Analytics. This is highlighted in yellow above.
For most e-commerce sites, the actual checkout process takes place on a separate domain or subdomain. In this case, you need to also add code based on the steps for tracking activity across domains and subdomains. I won’t go into that portion here, but you can watch the step-by-step video if this applies to you.
Now that you understand how to do the e-commerce tracking, how does this apply to the Google Analytics IQ exam?
While this wasn’t an expansive area of the exam, there were certainly questions that asked you to review the code provided and determine if it was correct or not based on what the question is looking to track. It is important to understand all of the different elements or arguments that are tracked and which arguments go with each of the call methods.
It is also important to remember, that the standard Google Analytics tracking code automatically knows when an https protocol is being used, so there is nothing for you to modify as your site moves between http and https.
To learn more about e-commerce tracking, visit to Google Analytics IQ Lessons to get more detailed step-by-step instructions.
Erin is an Account Supervisor at Hanapin Marketing, a search engine marketing firm focused on generating results through PPC and SEO.