Are you running an eCommerce site on WordPress using WooCommerce? Would you like an easy way to track sales conversions in Analytics without any premium plugins or difficult coding? You can create a simple goal in Google Analytics that will fire each time someone completes a purchase in WooCommerce by simply looking out for the order received URL snippet that is accessed following a successful completion. A little custom setup alongside the WooCommerce plugin from Automattic is all it takes to gain some very useful insight into your website’s performance.
Tracking WooCommerce sales in WordPress through Analytics
To set up a Google Analytics goal for sales on WooCommerce, you must first access the Admin panel. Once there, make sure the property is that of the website you want to track, and the view is all website data. In the view column, select goals to get started. Don’t worry, it’s easy, and you can always create another goal or edit this one if you make a mistake.
Analytics goal creation instructions
Here you can create a new goal by using the built-in wizard. There are three steps to setting up a goal in Analytics this way.
- Goal Setup – You can select “place an order” as the template of choice and move on.
- Goal Description – Name your goal “Completed Purchase” or something similar to help identify it from other goals. Select destination as the type of goal.
- Goal Details – In the details, under Destination, select Regular Expression and enter “checkout/order-received/” into the text box. You can optionally apply a monetary value to each completed purchase.
Once you’ve finished these steps, you can click re-verify this goal to ensure that everything is working properly. If you’ve had previous completed sales in the last 7 days, then you will receive a non-zero value for the conversion rate and can start gathering sales data. If this is a new build or if you previously haven’t had any sales, then don’t be surprised that verification shows no previous completions.
Verify your goal is being tracked
This goal works for all purchases made through a WooCommerce installation on WordPress (also, in any language if you are using WPML for translations). By default, WooCommerce will incorporate this endpoint into your domain’s URL. The exact location can change depending on settings, but we’re only looking for the specific text expression itself, anything else will be ignored.
If everything looks in order, click save and you’ll begin gathering data on WooCommerce conversions. You can now see which campaigns and sources perform better than others, to maximize your return on investment and plan for future marketing expansions! Of course, purchases must be coming through for this goal to work. If you haven’t had any sales recently, then don’t be surprised when the verification test shows no completions in the last 7 days. If you have limited data or are just getting started, you can try making a purchase yourself. Generate a one-time use, 100% discount coupon and then use it to make a purchase so you can verify the goal is being tracked.
Now that you’re properly tracking your sales, why not visit our blog to get more digital marketing tips and tricks or jump right in with topics like on-page SEO best practices or how Google is going to speed shame slow websites.
WooCommerce Order Completion Goal Setup Video
Visit our YouTube channel for quick digital marketing video guides for this and other articles from our knowledge base!
GREAT STUFF. Works as you said. i was struggling to record goals properly . now seems sweet
Great to hear, happy to help!
Thanks for the help! Very nice!
It easy to achieve but not perfect way. If someone refresh thanks you page you will have 2 conversion in GA. But for not large e-commerce simple solution.
There are definitely much better ways of getting this done where you can also glean more actionable data. However, as a quick fix, a regular expression goal can get you up and running, and for smaller clients can be plenty. You can of course replace the expression in the example with a thank you page or something similar, avoiding the use of GTM.
Thanks for commenting, Łukasz!
Thank you for this! I was struggling to figure out what to put in the “destination” box.
Hi, thanks for your guide. How can I find that which percent of purchases are not successful?
How would you set up an add to cart goal ? It is asking for mandatory conditions, I don’t know what to put.
Brilliant article, very helpful!
I am grateful for this information you have shared with us. I think I know better now. I wish you all the best things in life..
Hi, could I ask a question about the checkout/order-received page in WordPress? For some reason, many of our conversions show to have this page as their source. Would you have any idea why? I have looked everywhere at this point, any help guiding in the right direction would be greatly appreciated!!
It may be that you have the checkout window hosted elsewhere and it’s embedded in the page?