We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi, how to set up GA to track every pageview ?
i come up with this solution:
var gaScript = 'https://www.google-analytics.com/analytics.js'; DocHead.loadScript(gaScript, function() { ga('create', 'UA-XXXXXX-Y', 'auto'); FlowRouter.triggers.enter([(context) => { ga('send', 'pageview', {path: context.path}); }]); });
but sometimes enter trigger is not fired on page load...
enter
The text was updated successfully, but these errors were encountered:
@achtan did you every find a solution for this? Wondering the same thing. Thank you for any help you can offer, cheers~
Sorry, something went wrong.
hi, i'm still using FlowRouter.triggers.enter
FlowRouter.triggers.enter
Just add a global routeTrigger for this. i use this for my GA scripts with no issues. Occasionally I might need to add a small delay
@ryanbuiltthat can you show us your code? because in mine (from first comment) ga() is fired on first page load, every other page loads are fine
No branches or pull requests
Hi, how to set up GA to track every pageview ?
i come up with this solution:
but sometimes
enter
trigger is not fired on page load...The text was updated successfully, but these errors were encountered: