Skip to main content

GA4 Measurement Protocol purchase event processing bug

· 5 min read
Aleksandar Vucenovic
Chief Growth Officer

featured image

  • I was wrong and I was right about the bug
  • Update to the session_id bug post

What happened?

We started getting reports from our users that GA4 channel attribution suddenly started to break. All purchase events processed through the GA4 Measurement Protocol were attributed to 'unassigned'.

We already had bug reports few weeks ago about a similar issue. GA4 stopped showing purchase events in the reports. That was even worse.

When I investigated that issue and found that purchases processed through the Measurement Protocol and where the session_id was missing were not affected. The issue was only with purchase events where the session_id was set. So in a bit of a hurry, I removed the session_id from the purchase events and published a new version of the Pixel Manager.

Unfortunately I had forgotten what the session_id was for before removing it. It's used to stitch together user sessions across devices and platforms. So removing the session_id from the purchase events helped bring back the purchase events in the reports, but it broke the channel attribution.

To fix the channel attribution and bring back the purchase events in the reports, I needed to be more careful with my further investigation. I took my time to investigate the issue thoroughly to understand what was going on and find a proper fix for our users.

If it was just me, I would have been much faster to fix the issue. But, GA4's internal processing made this difficult to debug fast.

  1. The GA4 Measurement Protocol validation endpoint never returned any errors. It accepted all the events we sent and responded with empty error messages.

  2. GA4 takes 24 hours to process purchase events. So I had to wait at leas a day after each change to see if it had any effect.

Essentially this felt like poking in the dark.

Fortunately, one of our Pixel Manager users found another, similar support request of users who were not using the Pixel Manager, with clues that helped me to understand what was going on.

What did we do?

For the first two weeks it was really just poking in the dark. I removed properties from the purchase events, changed them, added them back, and so on, with no effect.

I asked around in a Slack group for Google Analytics experts, but none of them had a clue what was going on.

All of that changed when one of our customers found the support request from someone else on another forum and sent the link to us. It was about a similar issue, but they were not using the Pixel Manager: All orders and revenue reporting as Direct and Unassigned from 21st March

I investigated further and found other, similar reports in the Google Analytics expert group.

Now I was onto something.

What did we find?

In an early stage of the investigation I wound that the issue could be related to the new user-provided data collection feature in GA4.

Further investigation showed that it is possible that that feature might play a role to trigger the issue, but for solving the issue another setting had to be changed.

We had to change the Reporting Identity setting from Observed to Device-based.

Reporting Identity setting

Once we made that change, and waited for 24 hours, the purchase events started to show up in the reports again, and the channel attribution was fixed. Not only that, but also old purchase events that were not showing up in the reports before started to show up.

Hey Google!

There is no easy way to report bugs to Google. Sure, I tried their support. But it was just another proof that their first level support doesn't read the request. I got a very generic response about something completely different.

I tried contacting them through their Discord Channel as well. In my first request people were fast to answer, but also, didn't read the question. When I tried to explain the issue in more detail, I got no response. My guess is because it is not a generic issue, but a new bug, and they didn't know how to handle it.

The second time I had sent a request to their Discord Channel, I got no response at all.

This is frustrating.

I understand that Google needs to prioritize their resources. But, they should have a better way to report bugs when they are reported by a company like us that runs their products on more than 50'000 installs.

I do have much better experiences with product teams at Google for other products. But, for GA4, their support is adding more frustration than help.

After all, it wasn't a bug in the Pixel Manager. It was a bug in GA4. We lost a lot of time and nerves because of that. Some of our customers got frustrated too. This could have been avoided, maybe even prevented to become widespread issue, if Google had a better way to report bugs to them.

Google should have a better way to report bugs to them. And, they should have a better way to communicate with their users when a bug is confirmed.

Conclusion

If you are experiencing similar issues with GA4 purchase events processed through the Measurement Protocol, try the following:

  1. Update the Pixel Manager to the latest version

  2. Change the Reporting Identity setting from Observed to Device-based

You always have to wait at least 24 hours to see if the changes had any effect.