New Shopify Certification now available: Liquid Storefronts for Theme Developers

Shopify revenue is not showing in GA4

LacsonRavello
Shopify Partner
5 0 7

Hi Shopify Community,

 

I recently converted to GA4 Analytics. Only some of my Shopify revenue amounts are showing in GA4. I can't figure out why some amounts are showing and others are not. See attached screenshot. All transactions in this screenshot are Shopify. 

 

My website:

https://lacsonravello.com/

 

Below is a portion of the additional scripts in Checkout > Order status page settings:


'value': {{ checkout.total_price | divided_by: 100.0 }},
'currency': '{{ currency }}',
'transaction_id': '{{ order_number }}',
});
</script>

 

Can someone take a look and share some  insight as to why only some of my Shopify revenue is showing? I appreciate any insight and help.

 

Best,

Kristina

 

3889A23A-D55F-4144-8DB7-790C1A04FCDB.jpeg

Replies 29 (29)
rjmasilva
Tourist
4 0 2

Hello,
Have you found the solution? I am having the same exact issue.

Simon2285
Tourist
3 0 0

Hi Kristina - sorry for this dud reply, but I am seeing the same issue. The script I have in Shopify checkout settings is similar to yours:

 

dataLayer.push({
'event': 'purchase',
'customerType': customer_type,
'ecommerce': {
'currency': '{{shop.currency}}',
'transaction_id': '{{order.order_number}}',
'affiliation': strip('Shopify {{shop.name}}'),
'value': {{order.total_price | times: 0.01}},
'tax': {{order.tax_price | times: 0.01}},
'shipping': {{order.shipping_price | times: 0.01}},
'coupon': discounts,
'items': products
}
});

 

However, I am also only seeing a tiny proportion of online revenue value showing in my GA4 reports (approx 5%). At first I thought GA4 set-up may be incorrect (which may still be the case), but after viewing a number of posts in various forums, it appears to be a common problem.

 

Interestingly, GA4 is showing (fairly accurately) the same number of orders as is shown in Shopify (5-10% variance depending on time period). 

 

Do you have any other insights, or find a solution to the problem?

 

Many thanks

 

Simon

John_Duboyski
Shopify Partner
6 0 0

Hi Simon,

How is GA4 deployed to your site? gtag, Google Tag Manager, Google Sales Channel App?

This script you've shared above is for a DataLayer push. How are you then pushing the purchase event to GA4? using Google Tag Manager?

MauriceAB
Shopify Partner
10 0 9

I am having the same issue. Looking forward to a solution.

John_Duboyski
Shopify Partner
6 0 0

Hi Maurice,

Are you using the Google Sales Channel App by itself, or do you also have checkout scripts etc?

Could you provide more details about your setup?

Thanks

Jsmith1
Tourist
5 0 5

I'm having the same issue too, even after using the new recommended integration process from shopify

Relentlessone
Tourist
4 0 0

I'm also getting the same problem where revenue is only showing sometimes. All conversions are being tracked correctly but the revenue is missing sometimes. 

 

It seems the script is not able to get the price for some reason? 

 

It's not a currency problem, most of my payments are in USD and they are being converted correctly to AUD in G4. 

 

 

AlexV2
Visitor
3 0 0

Has anyone found the solution? 🙂

John_Duboyski
Shopify Partner
6 0 0

Hi @Jsmith1,

Are you using the Google Sales Channel App by itself, or do you also have checkout scripts etc?

Could you provide more details about your setup?

Thanks

Jsmith1
Tourist
5 0 5

Hi @John_Duboyski 

 

I used the instructions here - https://help.shopify.com/en/manual/reports-and-analytics/google-analytics/migrating-to-google-analyt...

 

I do have the google sales channel app set up and no additional scripts.

 

Thanks

 

Jacqueline

Jsmith1
Tourist
5 0 5

Adding to the list, I'm also finding that shipping and discount fees aren't be pulled through

hardw
Tourist
5 0 3

Exactly the same issue here, about 50% of transactions are showing 0 and the others are showing correctly. We really need a fix for this, inaccurate data is not the way to run a marketing campaign

John_Duboyski
Shopify Partner
6 0 0

Hi @hardw,

How is GA4 deployed to your site? gtag, Google Tag Manager, Google Sales Channel App?

Thanks

Relentlessone
Tourist
4 0 0

This is the G4 script I am using. Is there any issue with the price? 

 

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-ZEW2CF540W"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-ZEW2CF540W');
{% if first_time_accessed %}
gtag("event", "purchase", {
transaction_id: "{{ order.order_number }}",
'value': {{ checkout.total_price | remove: ',' | times: 0.01 }},
tax: {{ tax_price | times: 0.01 }},
shipping: {{ shipping_price | times: 0.01 }},
currency: "{{ order.currency }}",
items: [
{% for line_item in line_items %}
{
item_id: "{{ line_item.product_id }}",
item_name: "{{ line_item.title | remove: "'" | remove: '"' }}",
currency: "{{ order.currency }}",
price: {{ line_item.original_price | times: 0.01 }},
quantity: {{ line_item.quantity }}
},
{% endfor %}
]
});
{% endif %}
</script>

John_Duboyski
Shopify Partner
6 0 0

Hi Kristina (@LacsonRavello),

Could you share the full checkout script you are using?

A common issue I see with this is stores using checkout scripts from their GA3 setup that haven't been correctly modified for the new GA4 format.

Also, how is GA4 deployed to your site? gtag, Google Tag Manager, Google Sales Channel App?

adamnyc31
Visitor
3 0 0

I have the exact same issue.  About 30% of my sales are showing up as $1 conversion in GA4 and AdWords.   Has anyone found the cause of this?

 

Screen Shot 2023-05-10 at 10.17.21 PM.png

 

Jeff_Cline_
Shopify Partner
4 0 2

Adding to the long list of unanswered questions,

 

We are working with multiple Shopify accounts and seeing similar issues across all of them.

We have the Shopify Google channel connected to GA4, and we are using the same additional scripts in checkout sending purchase event data. 

 

We have revenue discrepancies between systems on multiple Shopify stores where anywhere from 20% to 80% of revenue is missing. 

Deeper investigations have shown either missing product-level revenue or missing transaction ids when compared to Universal Analytics.

 

Posting to see if anyone has found a solution to this and keep notified of any possible updates.

We have spent hours scouring help articles only to find threads like this with multiple people facing the exact same issues.

Frankie_F
Shopify Partner
1 0 0

Hi Jeff, we are seeing the same issues, have you heard of a solution yet?

Jeff_Cline_
Shopify Partner
4 0 2

May not be a perfect solution - but we were able to solve some massive discrepancies - see my update below and let me know if it helps.

spiritpieces
Shopify Partner
5 0 0

Adding to the thread - based on the numbers I think it may be related to when third party payment gateways are involved, i.e. Paypal.  The revenue numbers don't quite match up once I add in Paypal (I have sezzle and affirm as well) but the conversion count comes pretty close.

MaxGal
Shopify Partner
1 0 0

I conencted shopify to GA4. everything works great except the revenue. At first purchase i did see the revenue but after couple minutes it changed to "0" and since then Everything is "0".
Google won't give any suppot at all regarding GA4 and their community is not helping as no one replying there.
I see everyone here has same issue or something simillar so i guess its a bug?
Does anyone here has connected GA4 and it works great?

Jeff_Cline_
Shopify Partner
4 0 2

Take a look at my details below - had to work hard, but we were able to close the gaps - noting it may not be a perfect solution - but has made some big differences for us.

John_Duboyski
Shopify Partner
6 0 0

Hey everyone,

 

I've been looking into this issue as it's something that many of my clients have struggled with.

 

I've noticed that the Google Sales Channel Apps either work perfectly OR is riddled with discrepancies, the cause of which is difficult to identify. In some cases it appears to be conflicts with apps and/or existing configurations, but they appear to vary from case to case.

 

If you're wondering, I'm a Tracking & Analytics Experts and I do LOTS of work with Shopify / GA / GTM etc and complex tracking issues.

 

For anyone open to it, I'm happy to look a look at your account at no cost to see if I can

 

a) identifying your issue,
b) spot patterns across installations that may been causing these issues consistently
and
b) offer a solution if I can see one, whether that's broadly or for your specific case.

 

I will need access to your Shopify account, your GA4 account, and your Google Tag Manager account if you're using that for anything related to Google Analytics.

 

If you're happy to provide those then submit your details on the following link and I will connect with you to arrange accesses etc.

 

http://scheduling.fluxdigitallabs.com/GA4-Shopify-DIR

 

Please keep in mind:

 

1) This will be first come first served.


2) You may be on a list for some time depending how quickly I get through requests, and I am doing this pro bono around other commitments.


3) I make no promises about being able to solve your particular case.


3) If you're expecting free implantation work to deploy a solution then save us both the time and do not apply. I'm happy to diagnose and advise but implementation of a solution rests with you. I can help with that if you decide that's best for you, but that would not be free. Appreciate your understanding on why I have to draw this line.

Phill_Smith
Visitor
2 0 0

Any update on this?

Phill_Smith
Visitor
2 0 0

Has anyone figured out a solution to this?

spiritpieces
Shopify Partner
5 0 0

No, but the missing transactions lines up well with transactions going through paypal.  I think if customer goes off site Shopify loses track of the session.

Jeff_Cline_
Shopify Partner
4 0 2

Wanted to post an update for all the agencies and small businesses suffering from the data discrepancies noted in this thread.  - I know the pain and offering what I can to support the community. (Fix at the bottom, but worthwhile reading in between)

 

Options and a fix for you from our experience:

  • Javascript in checkout - - after deep review by our teams - we found that the script solutions provided early in the GA4 rollout can conflict with the native plugin - for all of our clients we are recommending removal and reliance on the default Shopify sales channel for google and youtube which seems to be a simple implementation (and ill explain how to fix the flaw in revenue below)
  • Identifying revenue discrepancies - - In investigating this for our clients we found several useful reports in GA4 to help close the gap.
    • If you haven't already - in GA4 - go to reports, and Library at the bottom, ensure the business objectives reports are published and added to your GA4
    • Once published you will see the new business objective reports - Go to: Drive online sales > E-commerce purchases and confirm you can see items viewed, added to cart, and purchased. 
      • This was where we first noticed some items being sold but not getting attributed revenue.
    • Under the reports in GA4  go to: Lifecycle > Engagement > Conversions
      • Here we want to modify the report to view revenue discrepancies 
      • Click the pencil icon to edit the report.
      • click metrics
      • Add the metric "event value" to the report and save changes to the current report.
      • Specifically, we want to look at the purchase conversion - its value vs its revenue. 
        • we found multiple accounts where the purchase event value more closely matched Shopify platform revenue, but GA4 reported revenue was under the purchase event value.
      • if your revenue and event value don't match here - there is another step to take 

Example of mismatch in GA4:

Screen Shot 2023-06-14 at 6.48.23 PM.png

  • Last item - after a lot of digging we learned that for unknown reasons (particularly when scripts are in place with the default sales channel) the currency is not always added to the purchase value.
    • We learned - in order to populate as revenue in GA4 the event must equal "purchase", must have a value, and must have a currency
    • In many of the discrepancies, we could see items with values that were not populating as currency.

THE FIX  

Please note this is not a guarantee of matching UA revenue - but we have seen this close the gap on missing revenue. 

  • Login to your GA4 account and click the gear icon at the bottom - go to the admin settings
  • under the property column click on events.
  • in the event screen - click modify events, and then create
    • Modification name: Purchase with Currency
    • Matching conditions: event name equals purchase
    • Modify parameters: 
      • replace the default event_name with currency
      • New value: USD   (or your local currency code) 

 

Give this a few days and your purchase event values and revenue should start to align and more accurately match.

 

GA4 After implementing:

Screen Shot 2023-06-14 at 6.49.26 PM.png

 

For those with Paypal or other payment portals (afterpay etc), you may want to add referral exclusions for the payment portals in GA4  or look at model comparison tools and first user source/medium vs session source/medium for your reporting.

 

Hoping this helps some of you get closer, it's made improvements for us.

Mitrodol
Excursionist
21 1 20

Hi , the solution you provided is not connected with purchase event tracking. 

 

And native GA4 integration is very awful. So as the previous Shopify-UA integration. I have seen so many stores where transactions were duplicated in UA (just creating Custom report with dimension transaction id and metrics transactions and revenue).

 

Since Shopify has introduced native integration with GA4 we have tried to use it but were shocked , discrepancy between GA4 and Shopify data can be 30 - 50 %. Before we were using dataLayer pushes with GTM method and average discrepancy was usually about 10 %.

Also we have tried to map native integration with GTM method to track view_cart, view_item_list, remove_from_cart, etc. events. But as purchase event is tracked with native gtag integration we still observed that great discrepancy.

 

So now we are using our just own GTM method with purchase dataLayer push on the order status page as we used it before but starting from the end of April - beginning of May we are observing too great discrepancy 20 - 30 % still even using our method with pushes. I have found that quite often page_view of the thank you page is recorded but no purchase event on it. And sometimes there is no page_view of the thank you page at all (it has /thank_you in URL).

 

Also we think that there were changes in Shopify back end connected with the thank you page appearance. Maybe because of payment gateways -Shopify interaction , maybe because of first time accessed condition. Nevertheless, it's not Google's problem, it's Shopify indeed.

I have left some comments in topics connected with this issue.

 

https://community.shopify.com/c/technical-q-a/if-first-time-accessed-does-not-return-true/m-p/210349...

https://community.shopify.com/c/shopify-apps/ga4-not-counting-every-purchase/m-p/2093143#M63877

ab2813
Shopify Partner
1 0 0

Hi! Thank you for this. I tried this and it quadrupled my products £ amount! It said 4 sales in one day (of about £5 each) was then worth £11k! 😄 Not a problem. How do I delete this modification? Do I have to go through a data deletion request? As it's associated with the purchase event I am nervous to do it this way. Thank you!