Skip to content
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

Analytics javascript bundle loads twice on exported website #3

Open
chuntley opened this issue Aug 9, 2020 · 4 comments
Open

Analytics javascript bundle loads twice on exported website #3

chuntley opened this issue Aug 9, 2020 · 4 comments

Comments

@chuntley
Copy link

chuntley commented Aug 9, 2020

It seems that on an exported website the analytics javascript bundle loads twice. I'm assuming this is because it loads the SSR version first, then again the client version. Would it make more sense to ignore the SSR version of analytics and only load the bundle on onMount()?

@imbolc
Copy link
Owner

imbolc commented Aug 9, 2020

Do you mean crating the script tag dynamically? SSR version shouldn't send statistic now after #2

@chuntley
Copy link
Author

chuntley commented Aug 9, 2020

Yes, based on the network information that I attached above that it loads the js?id=UA- bundle twice. First time initiated from the script tab, the second time from client... which looks like the client generated script tag.

@begonaalvarezd
Copy link
Contributor

Maybe is related to this issue? sveltejs/sapper#1124

@chuntley
Copy link
Author

Looks related!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants