-
Notifications
You must be signed in to change notification settings - Fork 18
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
add option to avoid tracking on initialisation #5
Conversation
Hey @antonk52, thanks! I'm not sure that I really understand the need for this. Generally, the location/pathname is the only thing that matters for tracking -- the I'll have to think about this a little bit more (brain not working today 😞) but feel free to try and convince me 😆 |
Thank you for taking a look. There are two main reasons I believe this is a good addition
I can not think of a more generic case, so I will share my specific one. I found there are 3 main ways to do tracking in p/react apps:
Regardless of which one I choose, using Ganalytics sends a A work around this could be to recreate I think it is a good tone to let a developer opt in or out whether one want to dispatch the initial Please let me know if this makes sense and it is not just me moaning 😅 |
May I ask what router you're using within your P/React app? |
I am using React Router v4.2.0 |
Without this, there's also no way to sanitize the initial URL. |
This reverts commit f833bb8.
Sorry for the super-delay on this. I went into your branch to revert your initial commit & got the same functionality in here.
Also included quick documentation. Thank you! 🙌 |
Thank you. Awesome job with documentation too! |
An extremely low size cost addon (+4b for gzipped) to allow avoid tracking on initialisation. Backwards compatible and particularly useful for SPAs that do not have server side rendering. Before with initial page load it would track a
pageview
event with default, in some cases incorrect document title. Will gladly discuss if you think this is a bad idea.