Learn business growth with Google Analytics 4 Forums Google Analytics 4 Troublesome Purchase Tracking via Google Tag Manager for GA4

  • Troublesome Purchase Tracking via Google Tag Manager for GA4

    Posted by Daniel on 9 June 2022 at 7:05 am

    Hey there, I’m grappling with getting GA4 set up for my online store and I’ve got a wee bit of a headache with the purchase tag. Oddly enough, some purchases aren’t logged correctly in GA4 – recorded twice or not at all. But when I peek into the Google Tag Manager’s Preview mode to test the tag, it’s cool as a cucumber.

    Then there’s the curse of the unavailable items parameters in the GA4 schema. It’s because my datalayer plays by different rules and I can’t nudge the variable names within it. I’m stumped – got any tips on how to scoop up this information?

    Wanna look at my datalayer for the purchase event? Here it is:

    Now here’s the purchase tag as I’ve crafted it in GTM:
    “Purchase tag”

    When I flip over to the debug view in GTM and put the preview mode for a spin, the tag fires up nicely (just once, but shucks, without the items parameters). But oh my, when I pop over to GTM’s preview mode in the GA4 property, sometimes it’s double the trouble with two fires. Got any sage advice to sort out this pickle?

    Tran replied 1 year, 5 months ago 3 Members · 2 Replies
  • 2 Replies
  • James

    Member
    14 September 2022 at 6:11 pm

    Hey! Can you show me the value of the {{DLV -order.items}} variable that’s in your GTM Debug Tag Assistant? That could help us troubleshoot. And guess what? You can use a custom JavaScipt variable to help map your datalayer for GA4, which would probably sort out that parameter issue you’re having!

  • Tran

    Member
    11 February 2023 at 1:40 am

    It sounds like you’re having issues with conversion duplication and missing item parameter problems in GA4 via Tag Manager. Your task will be converting the data layer variable names to the GA4 names. Look into using custom JavaScript variables in GTM to translate your format into GA4’s. Also, double-check the triggers for your tag – it’s possibly firing twice due to some duplicates.

Log in to reply.