Skip to content
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

fix(ec): pageview will not include action, product and impression #458

Conversation

sallainCoveo
Copy link
Contributor

@sallainCoveo sallainCoveo commented May 17, 2024

Jira: https://coveord.atlassian.net/browse/LENS-1826

The issue described in the Jira, Slack thread and discuss was that sometimes the "event" type event didn't include the product and product action / the "pageview" type event include the product and product action.

It would seems that the order of event that are sent is important, but to prevent the plugin's data to be cleared too soon OR that we include the data to a pageview event, I've added a pageview check.

One argument that could be made is to put the emphasis in the documentation that the "event" type should absolutely be sent before the pageview to prevent this problem. However, there's also an argument to be made that maybe the order shouldn't matter (especially when these events were historically coupled together, so more client's implementations might be broken then we think).

Demo of the results:

demo_pageview_not_included_product_and_action.mp4

Copy link
Contributor

@samisayegh samisayegh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice investigation and fix ✅

functional/ec-events.spec.ts Outdated Show resolved Hide resolved
src/plugins/ec.ts Outdated Show resolved Hide resolved
@sallainCoveo sallainCoveo force-pushed the fix-LENS-1826-possible-race-condition-between-pageview-and-detail-events branch from 23a0d6d to cc0b253 Compare May 22, 2024 13:23
@sallainCoveo sallainCoveo merged commit a018062 into master May 22, 2024
5 checks passed
@sallainCoveo sallainCoveo deleted the fix-LENS-1826-possible-race-condition-between-pageview-and-detail-events branch May 22, 2024 15:18
fvanham-coveo added a commit that referenced this pull request Jul 25, 2024
fvanham-coveo added a commit that referenced this pull request Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants