-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
gatsby-plugin-google-analytics - sameSite "deadline"? #21228
Comments
It seems my plugin isn't injecting the code into the header tag? anything I can do to debug that? as per Roshan's response, EDIT** I moved it into headers, still no luck, apparently this could be the issue https://support.google.com/tagassistant/answer/3059154#http_response but not sure why the gatsby plugin would not work |
@Cobwebster The Can you confirm that you're running the latest version? Which is All the plugin does is sets the tag so this is likely unrelated to the plugin |
Yep, I have the head option and latest version :/ |
I seem to have this issue, google analytics no http response detected which seems to have generated a few gatsby plugin error posts in the past but I don't see any solutions put forward:/ |
I was getting the same error as you are. As your site is now in a subdir, maybe try adding the pathPrefix value to gatsby-config.js then compiling with: Keep in mind though:
It fixed the issue for me |
Hey, thanks for the suggestion, I added pathPrefix: |
Bummer :-/ Also eta.. if tracking is restricted to a subdirectory for that GA Property then cookie path should be set in the tracking code options |
I went back to my original tracking ID to make it more simple, I have now managed to resolve the issue with thanks to your support. It seems that I should of actually made sure my site renders in a way which makes /wiki instead of just making a folder and dropping it in, I also have some mapping files in my root directory which I assume is where GA gets the links from. Thanks again for your time and everyone else who helped out. |
Hey,
I recently moved my site into a folder within /root and used 301 redirects. Now, it seems impossible to get google analytics working,
I read up on https://www.simoahava.com/gtm-tips/chrome-samesite-warnings-google-tag-manager/
because my site is spammed with sameSite warnings and I'm not sure if it related.
Is there anything special that needs to be done with gatsby-plugin-google-analytics when used within a sub directory?
this is the site in question - https://www.craftmc.net/wiki/
and all pages under /wiki/ have the plugin injecting my google analytics code.
Any info on this is appreciated, i've tried making new properties but it just seems like google isn't tracking any page loads.
The text was updated successfully, but these errors were encountered: