bigcommerce / cornerstone

The BigCommerce Cornerstone theme
https://developer.bigcommerce.com/stencil-docs
287 stars 607 forks source link

Google Analytics EC product impressions for product collections not correctly implemented #1532

Open fthobe opened 5 years ago

fthobe commented 5 years ago

Introduction

Impression Events in Google Analytics allow us to monitor the visibility of an Item in various lists. For example how often the item "Big Super Fluffy Towel" (generic example) has been seen in lists such as:

Since #1377 Cornerstone sends these impressions to Google Analytics. This dataset allows marketers in combination with product detail views and clicks in BigCommerce to create a quiet precise customer journey and measure more precise than ever the interaction between users and shops.

Expected Behavior

When using product lists in BigCommerce, product impressions for the specific products should only be send to Google when the respective products are visible and not when products are hidden by css or not visible for what ever other reason.

Actual Behavior

Cornerstone always sends a product impression for all products in the grid no matter if they are visible or not. Therefor it is not possible to determine the real CTR of products and lists but only a fictional value as the product impressions sent to Google Analytics are not real impressions but merely the loading of an element into a list without considering visibility.

Correct implementation

Fire the GA Event only when a product is really visible as described here:

fthobe commented 5 years ago

Hey @Tiggerito usually you share your thoughts on such topics.

fthobe commented 5 years ago

@lord2800 Some more Google Analytics magic, this one seems much easier to risolve. If you tell me your preferred approach we might sacrifice a day of one of our developers and commit it.

lord2800 commented 5 years ago

I think the scroll option is going to be the best option, but let me check in with some people and see what they think about which path we should take.

Also, I suspect this won't be fixable from the cornerstone side, since the code that does the attribute reading and event sending lives on the bigcommerce side rather than in cornerstone.

fthobe commented 5 years ago

@lord2800 Hi Jeff, thank you for taking the time to reply. Have you seen other events of Google Analytics that might need a separate issue?

Tiggerito commented 5 years ago

I'd agree with this. But class it as a trying to be perfect feature.

I suspect this data is or will be used by Google Ads. That extra perfection may make dynamic remarketing a bit more accurate.

fthobe commented 5 years ago

Hi tigeritto, i disagree, products should work as advertised :)

fthobe commented 5 years ago

@lord2800 Hi Jeff, do you have an update on this one?

lord2800 commented 5 years ago

Sorry, no update yet. 😞

fthobe commented 4 years ago

@lord2800 Hey Jeff, this topic is open for some time now.

Tiggerito commented 1 year ago

Since then, I've developed my Tag Rocket app that does monitor when products become visible (using the data attributes to identify products). It supports this for all tags within Tag Rocket but does not fix the BigCommerce Universal solution. As Universal is only going to be around for 8 months, it's probably not worth enhancing it.

Another less-known issue with the Universal solution is that sending lots of products in one event can cause the hit to be rejected. A single hit can't exceed 8k. So category pages showing a lot of products may not be successfully sending their hits. Sending products as they become visible is part of the solution for these payload limits. GA4 has a limit of 16k.