diff --git a/README.md b/README.md index 453baca..a3ef269 100644 --- a/README.md +++ b/README.md @@ -269,6 +269,14 @@ An empty `Array` will move the current user into the control group. Gets the props for the current variant from the groupVariants. +## Impression tracking + +When the experiment props are received, the React component will remount, so any impression tracking events inside the component may be executed again (if they are in any lifecycle methods like `componentDidMount`). + +To avoid recording duplicate impressions, consider ways to mitigate this: +- Adding a flag as a global variable to check if 'mount' events have already been fired +- Moving impression events outside of the experiment (into a wrapping component) + ## Changes and history See [CHANGELOG.md](./CHANGELOG.md).