How to Track Conversions Easily
The Easiest and fastest way to track the conversions on your website. No need to be a rocket scientist to understand it. Most commonly used and flexible to make easy to maintain later on.
How to Track Conversions with Google Analytics 4 (GA4)
{% image ‘images/articles/how-to-track-conversions-easily-by-cro.media.png’, ‘Tracking Conversions’, [600, 300], “(max-width: 800px) 650px, 100vw”, “eager” %}
Tracking conversions on your website is crucial for understanding user behavior and improving business performance. With GA4, the process has changed a little — but don’t worry, it’s still manageable.
Step 1: Create a Google Account and Google Analytics Property
Start by creating a Google account — doesn’t need to be Gmail. Once done, you can set up a GA4 property. This property will help you track visitors and conversions.
Step 2: Set Up Your GA4 Property
After creating your GA4 property, generate a web data stream. You’ll get a Tag ID. This is important — you’ll need it shortly.
Step 3: Add GA4 Tags to Shopify
From Shopify admin, follow these steps:
- Go to Online store > Preferences
- In the Google Analytics section, click Manage pixel here
- Click Connect your Google account
- Select your GA4 property’s tag
- Click Connect
If you haven’t installed the Google & YouTube channel yet, Shopify will prompt you. And nope — you don’t need Google Merchant Center here.
Want to get serious with optimization? Learn how to run AB Tests on Shopify.
What’s Conversion Tracking in GA4?
GA4 tracks “Key Events” — those juicy actions like purchases, form submissions, and sign-ups. With tracking in place, you’ll better understand your customer journey and make smarter CRO moves.
Shopify analytics is decent, but GA4 gives you superpowers.
Tip: If you’re migrating to Checkout 2.0, here’s how to keep your tracking: Checkout 2.0 tracking setup
Or skip the struggle and use our module: Shopify Checkout Extensibility Upgrade
Extra Tracking? Meet Customer Events API
GA4’s cool, but you can go next-level with the Shopify Customer Events API — track clicks, add-to-carts, checkouts, and more. Use Shopify’s Pixels Manager to:
- Monitor behaviors like checkout, clicks
- Keep your site secure and compliant
- Avoid conflicts with random scripts
Adding Pixels? You’ve got two options:
- Install via marketing apps
- Ask your dev (or us 👀) to add them manually
Adding Custom Pixels
Let’s say you want to add a Meta pixel. Here’s what you might start with:
<!-- Meta Pixel Code -->
<script>
!function(f,b,e,v,n,t,s)...
</script>
<noscript>
<img ... />
</noscript>
But Shopify’s pixels don’t support HTML like that, so here’s the JavaScript version:
!function(f,b,e,v,n,t,s){
if(f.fbq)return;
n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
Want to load a script like GA’s gtag?
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="code.js"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag("js", new Date());
gtag("config", "YOUR_PIXEL_ID");
</script>
Here’s the JS-only version for Shopify custom pixels:
const script = document.createElement("script");
script.setAttribute("src", "code.js");
script.setAttribute("async", "");
document.head.appendChild(script);
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag("js", new Date());
gtag("config", "YOUR_PIXEL_ID");
Okay, So It’s a Bit More Techy Than Expected…
If this feels like a dev-level task — it is. But hey, that’s why Shopify devs and CRO agencies exist 😉. Don’t hesitate to reach out and get this done properly.
Ready to move forward with better tracking? Then make sure to check out our CRO Audit for Shopify and see where you can improve.