nytimes / react-tracking

🎯 Declarative tracking for React apps.
https://open.nytimes.com/introducing-react-tracking-declarative-tracking-for-react-apps-2c76706bb79a
Other
1.88k stars 123 forks source link

Guard against pushing empty events #88

Closed schustafa closed 6 years ago

schustafa commented 6 years ago

If you have multiple mount points in your app, or if you only use react-tracking in subtrees of your React app, you may encounter a situation where you see empty tracking objects pushed to your data store. That's... not terribly useful.

This change prevents empty objects from being pushed to window.dataLayer.