Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi. I'm using UA via the inbuilt settings. Enhanced ecommerce was turned off.
In December:
Shopify reports 49K revenue
UA reports 43K revenue.
About 2K disappeared in ReCharge subs and the other 3K might be something like slow scripts on order-status page, and I understand they will be a little different.
However......
GA4 reports only 18K revenue! Any ideas? https://woowoo.fun
What did I miss?
Notes:
The GA4 tag is added directly into the theme.liquid.
The "purchase" event is inserted to the order-status page via Shopify's [additional scripts] area with the following script:
<!-- GA4 checkout and datalayer scripts --> <script async src="https://www.googletagmanager.com/gtag/js?id=G-Y0QGYZDMPZ"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-Y0QGYZDMPZ'); {% if first_time_accessed %} gtag('event', 'purchase', { "transaction_id": "{{order.order_number}}", "value": {{total_price | times: 0.01}}, "currency": "{{ order.currency }}", "tax": {{tax_price | times: 0.01}}, "shipping": {{shipping_price | times: 0.01}}, "items": [ {% for line_item in line_items %}{ "id": "{{line_item.product_id}}", "name": "{{line_item.title}}", "quantity": {{line_item.quantity}}, "price": {{line_item.line_price | times: 0.01}} },{% endfor %} ] }); {% endif %} </script> <!-- END GA4 checkout and datalayer scripts -->
For anyone searching later that might find this, I moved the GA script into GTM, added GTM script to the checkout, and added the datalayer variables in GTM so they get sent to GA properly. All good now.
I will give it a try, thanks!
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025