Blackout is the codename for the Farfetch Platform Solutions (FPS) projects. Useful to build e-commerce applications using the FPS APIs and integrating business logic.
MIT License
42
stars
15
forks
source link
fix: fix tracking of uniqueViewId and previousUniqueViewId in analytics #980
This fixes a problem where if two or more consecutive calls
to analytics.page are added before the microtask queue has an
opportunity to run, the same values for the uniqueViewId
and previousUniqueViewId parameters for both the Omnitracking
events that would be generated. While this works, this is a temporary
fix since there are other values that suffer from the same problem,
for example, the consent and user values can be affected since they
are globally shared. A deeper change to analytics would be needed
to tackle this but as this is not a very common case, we will leave it
like that for now.
Dependencies
Checklist
[x] The commit message follows our guidelines
[x] Tests for the respective changes have been added
[x] The code is commented, particularly in hard-to-understand areas
[x] The labels and/or milestones were added
Disclaimer
By sending us your contributions, you are agreeing that your contribution is made subject to the terms of our Contributor Ownership Statement
Description
This fixes a problem where if two or more consecutive calls to analytics.page are added before the microtask queue has an opportunity to run, the same values for the
uniqueViewId
andpreviousUniqueViewId
parameters for both the Omnitracking events that would be generated. While this works, this is a temporary fix since there are other values that suffer from the same problem, for example, the consent and user values can be affected since they are globally shared. A deeper change to analytics would be needed to tackle this but as this is not a very common case, we will leave it like that for now.Dependencies
Checklist
Disclaimer
By sending us your contributions, you are agreeing that your contribution is made subject to the terms of our Contributor Ownership Statement