Learn business growth with Google Analytics 4 Forums Google Analytics 4 Troubleshooting GA4 Revenue Calculation Issues

  • Troubleshooting GA4 Revenue Calculation Issues

    Posted by Luna on 27 September 2022 at 1:51 am

    Alright, so here’s a peculiar thing that’s been bothering me, and I’m hoping some kind soul out there in the universe can help me sort things out. Google Analytics 4 – or as cool kids call it, GA4 – and I are having a bit of a misunderstanding, and by misunderstanding, I mean it’s been turning a blind eye to my tickets for a good month or so.

    Here’s the scoop: on my website, I’ve got users making purchases (go capitalism!), and all I want is for GA4 to kindly and accurately show my revenue in SAR. I’ve got this nifty piece of code at my disposal for successful orders:

    if(( typeof gtag !== 'undefined')){
                    gtag("event", "purchase", {
                        transaction_id: "{$order->paymentid}",
                        affiliation: "My Store",
                        value: +('{{$theTotal}}'.replace(',','')),
                        tax: {{$order->vat}},
                        shipping: {{$theShipping}},
                        currency: "{$order->currency}",
                        coupon: "{$order->coupon_code}",
                        items: temp
                    });
                }
    

    When it’s rendered, it looks like a perfect piece of modern art: enter image description here

    However, when I go check my GA4 dashboard, I don’t see the big bucks. Instead, I see a big goose egg or maybe one single nugget of revenue out of a goldmine of 10+ orders. And based on my client-to-server logs, I know those orders went through successfully.

    Here’s a peek into GA4 on a particular day: enter image description here

    And surprise, surprise! Here are my logs showing my online store was like one big successful order party, with 9 confirmed pings: enter image description here

    So, here’s the million-dollar question: why on Earth is GA4 doing me dirty by only considering one “purchase” event and ignoring the rest like they’re out of style?

    Just so you’re in the loop, here’s the tags I’ve got in the head: enter image description here. And here is a screenshot from the GA4 Admin settings: enter image description here

    Is there a GA4 guru in the house? Can anyone offer a brother some assistance? Thanks a heap!

    Owen replied 10 months, 3 weeks ago 3 Members · 2 Replies
  • 2 Replies
  • Isabella

    Member
    21 February 2023 at 7:23 pm

    Hey there! I totally feel where you’re coming from. But worry not; I might have a solution for you. You know when you dive into your GA4 setting (Google Analytics 4), there‚Äôs this particular option? It’s sort of like a switch, and it says “Enhanced measurement”. You need to ensure that this one is turned on.
    Have a super quick look at this picture for clarity:
    enter image description here
    Give this a go, and fingers crossed, your problem will disappear!

  • Owen

    Member
    29 June 2023 at 12:38 pm

    The issue you’re encountering may be due to your ‘transaction_id’ parameter not being populated. For the purchase event in Google Analytics, it’s crucial to fill in this parameter. If you need more information on this topic, you can refer to the Google Analytics Developers Guide, specifically the section on purchase events.

Log in to reply.