New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parent Category disappeared from GA, attributing all events now to "not set" category #58
Comments
I'm guessing the upgrade from Craft 2 to Craft 3 is very relevant, as it'd result in a large number of changes to the website. So the initial screenshot is data coming from a Craft 2 site running a Craft 2 version of IA, and the second screenshot is from Craft 3 site running the Craft 3 version of IA? |
Thanks for the quick response, Andrew. Apologies here, I had our versions wrong. On June 23rd, we updated the following:
Our GA events transitioned to that second screenshot on June 16, however. The only other thing I'm seeing remotely related to IA on our end -> We had made some recent adjustments to how we generate those category breadcrumbs ( The only difference I'm seeing is the missing parent category and pipe prefixed in GA...can you confirm that the parent category and pipe are generated on the IA side? I'm not seeing anywhere in our codebase that is now or was previously producing that prefix. Thank you again for your help! |
hey @khalwat can you confirm that the Top Level Category and Pipe prefix are automatically applied by Instant Analytics? That seems to be the missing piece here... |
I'm not sure how this could change, but Instant Analytics does have a Product Category that you can set either in the Can you check on that? |
One related issue (can open post this elsewhere if you prefer) here is that it looks like if you select a single category in a hierarchical structure it formats it with a pipe and slash. For example: is formatted as Only reason I brought it up here is that I think
But for what it's worth, I did validate that Instant Analytics is passing a category through |
alright hey I believe I figured out the issue with instant analytics not setting the category. In our codebase, we're eagerloading the category on a purchasable's products in an event listener for later on in the lifecycle. It looks like instant analytics is specifically looking for a You can replicate the issue by adding this event listener and then trying to add an item to the cart:
this isn't exactly how we're doing it, but seemed like the easiest way to show the issue |
Yep, it's this that causes it to exit early: // If the source field isn't an object, return nothing
if (!is_object($srcField)) {
return $result;
} ref:
Probably it should handle the case where it is an array, due to eager loading. |
Addressed in: b8b25c8 & 92a6fb2 Craft CMS 3: You can try it now by setting your semver in your "nystudio107/craft-instantanalytics": "dev-develop as 1.1.18”, Then do a ….. Craft CMS 4: You can try it now by setting your semver in your "nystudio107/craft-instantanalytics": "dev-develop-v4 as 4.0.2", Then do a |
Question
I've read through documentation, as well as other user issues and PRs and am not able to find the answer if you could please help. As of June 15, our previously properly working IA events started attributing all events to the category "not set".
Previous events (with accurate data):
Current events (with inaccurate data):
At some point, the Parent Category dropped off of our category label here. You'll see in the accurate events, each event has the Parent Category with a pipe prior to our custom category labeling. I believe that is being done on your end here. For some reason that is now missing and all of our events live in the "not set" category.
Additional context
Instant Analytics 1.1.12
Craft CMS 3.6.16
Craft Commerce Pro 3.4.0
We recently upgraded from Craft 2 -> 3 if that is relevant!
The text was updated successfully, but these errors were encountered: