-
-
Notifications
You must be signed in to change notification settings - Fork 9
Instant analytics not sending purchase data #49
Comments
It should be logging any time events are sent -- are you not seeing anything? Did you implement any kind of caching on the frontend that could affect things? |
Are the events also logged in production? Because in that case i don't see them in web.log. No other caching in place right now. |
@khalwat After some strategic dumping of vars in our staging env i found out that the order event is triggered but the event is not received in Analytics. So or it's blocked in analytics somehow or the But this seems on GA side. Any idea how to further debug this? |
@khalwat Sorry to keep buggin you with this. But is there a way to trigger the order send event from twig. To test if a manual trigger does work or maybe give an error. |
What version of GA are you running? |
Not the new GA4 one.
GA Property has been created in 2017 so it’s a legacy one.
There is one thing that's different on this new version of the site and the old one. It's that we use a few custom snapshot properties on the line items. Might that cause the trouble? As this is the event where the order is send with and the order is the only place where these custom properties on the product snapshot are set.
|
@khalwat Some more debugging led me too trying trigger the orderComplete function from a custom module variable. When i use that path all is working fine. So it seems that the webhook way used by the payment service is the killer here. Does that classify as a bug? |
@khalwat Last week we went a bit deeper with pin pointing this error and we found something out. The orders of logged in users is getting sent to GA, orders of guests are not. Difference between the 2 situations is that:
Situation 1 is the majority of the visitors. We bypassed this now to (ugly fix), change:
This makes sure every visitor gets the_ia cookie. But this is far from a fix. |
mmmm so it sounds like it's something specific to CloudFlare in terms of how this is not working for you. It looks like your change is just dropping any parsing of the I guess I'm unclear why if the |
Question
We've updated a client webshop to commerce 3 and did a full refactor of the front-end.
After updating the website and launching the website all instant analytics data is send nicely except for the purchase event. The store had multiple orders last weekend but none we're received in analytics but add to cart events are registered.
What's the best wat to check what events are being send? Logging shows no errors.
Is there a way to test instant analytics without me var_dump-ing in your code files?
Additional context
Craft CMS - 3.6.11.1
Craft Commerce - 3.2.17.3
Instant Analytics - 1.1.11
The text was updated successfully, but these errors were encountered: