google/eleventy-high-performance-blog

AllowDomainlist CORS in ga.js depends on deployment platform

indcoder opened this issue · 2 comments

cc @cramforce ,

My issue is very specific to Netlify deployment..

In the ga.js file, the example domain has a trailing slash

image

But unfortunately the origin returned by Netlify is bereft of the trailing slash [I'm not sure of vercel etc]

image

leading to

image

Perhaps in the README and as comments in ga.js we need to draw users attention to it....its a simple but tricky bug; it takes some time to debug...or the equality comparison needs to disregard the trailing slash.

Or the example [industrail empathy needs to be shown without the trailing slash]

Yeah, the / is wrong. Do you want to send a PR to fix it?