Reputation: 1
I have implemented the ga4 "purchase" event directly (gtag.js). When the user reaches the purchase success page, I see 2 "purchase" events in the tag assistant, the first one has the structure defined but not the internal codes that are added when it is fired (send_to, user_agent..., client_id, session_number, language, etc ). While the second "purchase" event has the defined structure, but loses information in certain fields, it presents the internal codes and shows that the event is triggered in tag assistant. Has anyone had a similar problem?
I removed the gtm tracking code, but the problem still occurs. I was hoping that by removing the gtm tracking code, the event would stop being duplicated and fire only once, but the problem persists.
Upvotes: 0
Views: 783
Reputation: 61
GA4 deduplicates the conversion events with the same transaction_id
from the same user. This could be the reason why you are seeing the first purchase
event & not the second one as you might sending both events with the same transaction_id
.
Here's the GA support article explaining this: https://support.google.com/analytics/answer/12313109?hl=en
Google Analytics only de-duplicates transactions with the same transaction ID from the same user. The same transaction ID can be used for different users without de-duplicating the transactions.
The tag assistant would show the second transaction as long as it detects the gtag event command. However, the deduplication is being done while GA4 processes the hits. If you debug your events using GA4 debug view, you won't be able to see the subsequent events with the same transaction_id
.
Here's a detailed case study I did in 2022 August when this feature was introduced: https://prabapro.me/deduplicate-ga4-conversion-events-4840a115c1
Upvotes: 0