You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for this module -- I've been doing some initial sandboxing in a basic create-react-app and have ran into two questions.
I'm having issues adding tracking events via decorators. I tried incorporating the babel decorators plugin but I believe this requires using "npm run eject" and modifying core files. Just curious if you know of a simpler way to use the decorators? Otherwise, I've been using the method described in the Stateless Functional components for all files which works too.
Can you help explain how to integrate this module with an analytics tool? For example, if I want each event sent to analytics with a POST to an API endpoint...where would that call go? I seem to be missing a step here because I only want to send the most recent item added to the dataLayer, not the entire dataLayer every time an event is triggered.
Thanks! #
The text was updated successfully, but these errors were encountered:
Yes, I believe you will need to eject to add decorators support to create-react-app, here's a blog post on this. If you'd rather not eject (I'd recommend not to, if this is the only thing you're adding), you could use recompose's compose function to stack higher order components together. In fact, this is probably something worth mentioning in the README -- feel free to open a docs PR 😁
Hello,
Thanks for this module -- I've been doing some initial sandboxing in a basic create-react-app and have ran into two questions.
I'm having issues adding tracking events via decorators. I tried incorporating the babel decorators plugin but I believe this requires using "npm run eject" and modifying core files. Just curious if you know of a simpler way to use the decorators? Otherwise, I've been using the method described in the Stateless Functional components for all files which works too.
Can you help explain how to integrate this module with an analytics tool? For example, if I want each event sent to analytics with a POST to an API endpoint...where would that call go? I seem to be missing a step here because I only want to send the most recent item added to the dataLayer, not the entire dataLayer every time an event is triggered.
Thanks! #
The text was updated successfully, but these errors were encountered: