Sample Test Plan for Google Analytics Enhanced Ecommerce/
June 21, 2018
Whether you’re launching a new ecommerce site or migrating to Google Tag Manager, testing your Google Analytics Enhanced Ecommerce implementation is crucial to ensuring quality data. At this point, your developers should have already added the enhanced ecommerce data layer code to your site, you have your tags set up in Google Tag Manager, and you’re ready to test. Let’s walk through tools you can use and various scenarios for testing.
Where to Check
First, let’s talk about where you should check to make sure your data is being collected properly. My colleague Dan has a blog post with great debugging tools that you can use to help with this process. As you’re testing, I recommend looking at the following:
In your browser’s console, check that the data layer values are being populated with the correct data. Make sure any monetary values are being passed as strings and are not using any commas or dollar signs.
GTM Preview Mode
Use Preview Mode to check that your ecommerce data layer events are firing and that your tags are firing on these custom events.
Google Analytics Debugger & Google Tag Assistant
Use these extensions to see the hits that are being sent to Google Analytics.
Real Time Reports
You should be able to see the enhanced ecommerce events in the Google Analytics Real Time reports in your unfiltered view.
Check your Google Analytics to see that the data is processed as expected. Are your product list views and clicks showing up as you expected? Are you seeing any duplicate transactions?
What to Test
Now that we know what tools we can use for testing, let’s talk about what to test. An obvious starting point is to find a product on your ecommerce site, go through checkout, and place an order. But there are several other scenarios you should go through when testing your enhanced ecommerce implementation.
Don’t worry, we did some of the work for you! Use this Google Sheet of the scenarios to take your own notes as you test your implementation.
To get started, just make a copy of the Sheet:
When testing enhanced ecommerce, let’s begin at the end. Not only do transactions have the most impact on your data, but, in my opinion, this is the easiest place to start. Here are some transaction scenarios you should test:
Try purchasing a single item and validate data layer values.
Multiple items, single quantities
Verify both products are pushed to the data layer and that values are populated.
Single item, multiple quantities
Ensure quantity and revenue are correct for multiple quantities. Beware of single line item data being sent rather than the complete order.
Multiple items, multiple quantities
Check that each product is included with total quantity and revenue. Watch out for single line item data or single product being sent to the data layer.
Purchase more than $1,000
Check that there are no commas in any monetary values. Commas are used as a delimiter between the dollar and cents portion of the amount, and you’ll see $1,000.00 items reported as $1.00 in Google Analytics.
Product names with special characters
Look for products that have single or double quotes, registered trademarks, or other unusual characters in their names. Make sure that quotes are escaped and that special characters don’t break your string.
What should happen to the transaction total with a discount applied? Does this look correct?
For more information on testing transactions, (using fake credit cards or users included) check out this post:
Published: September 8, 2016
Duplicate transactions can cause major problems in your data. They inflate your transactions and revenue, which will skew any other metrics using these for calculation. Jon has already written about how to check and fix duplicate transactions, but here are some scenarios you should test:
Refresh confirmation page
Does your transaction event fire a second time when you refresh your confirmation page?
Navigating back to the confirmation page
Go to another and then use the back button to return to the confirmation page.
Return to expired sessions
Let your session expire with 30 minutes of inactivity and then return to your confirmation page. This can be especially problematic on mobile where users tend to reopen their browser from the background.
Once you’ve tested your purchase event, let’s try out our checkout steps. This includes cart through the point where customer place their order. Here are some scenarios you should test in checkout:
Guest vs. logged in
Logged in users may skip over shipping or payment steps. Check that your checkout steps are reporting as you planned. If you need help determining what this should look like, check out Donovan’s blog post on defining checkout funnels in Google Analytics.
Different checkout methods (credit card, gift card, PayPal)
Are the correct monetary values being passed when you checkout with each of these methods? If you’ve added the payment type option to the data layer, you’ll also want to verify this.
Same/different shipping and billing address
If customers can skip over entering their billing address or have an added step for entering a separate billing address, you should check that your step numbers are consistent.
Add to/Remove from Cart
Now that we’ve validated our checkout steps and purchases, let’s continue to work backward in our ecommerce funnel. Let’s test different scenarios where users can add or remove products from cart.
Add to cart from category page
If your ecommerce site allows users to add to cart from the category page or offers a quick view option, validate that the add to cart event fires and with the appropriate data layer attributes.
Add to cart from product detail page
This is the most common place that you’ll add an item to your cart, so make sure that this is working properly. Check things like the different variations, color, size, etc. Does the SKU change on the page? If so, is that reflected in the data layer push? Does the add to cart event happen on the page with the add to cart button, or does that button take you to the cart page with the new item? If there’s on-page validation, checking for all of the options to be filled in, etc, then make sure the add to cart event only fires when there’s a valid add to cart action on the page.
Add multiple quantities to cart
Check that the appropriate quantity is sent with the add to cart event. Try a zero quantity add to cart and see what happens!
Add to/remove from cart on cart page
Don’t forget that users can increase or decrease their quantity in cart.
Note: Emily wrote a great post regarding changing cart values to get a more accurate view of revenue!
Published: June 29, 2017
Impressions, Clicks, and Detail Views
Finally, let’s test our product impression, click, and detail view events. Here are scenarios you should be sure to test:
Multiple product lists
Verify the product list names and other attributes for different categories and areas of your site. Check that your product, position, and price is populating for each visible product. If you don’t have that information available on every page where an ecommerce item is visible, then consider using data import to fill in these details by matching on a SKU or product name.
Infinite scroll/Load More
Does your impression event fire each time more products are loaded?
Don’t forget to use our Google Sheet to keep track of your testing and take any notes. Let us know what other tests you would recommend for validating Enhanced Ecommerce and we’ll add the best, most common issues to the list! Happy testing!