NowYouKnowProgramming / webdev-learning-materials

Don't waste time - the highest quality resource hub for web developers (and not only!)
https://bewebdev.tech
BSD 3-Clause "New" or "Revised" License
58 stars 11 forks source link

(fixed) Use gtag with partytown #150

Closed Willaiem closed 1 year ago

Willaiem commented 1 year ago

This pull request adds Partytown to delay the fetching of the google analytics script for better performance (hopefully). Since it has the commits from https://github.com/NowYouKnowProgramming/webdev-learning-materials/pull/147, these commits will be ignored.

Fixed the issue with CORS - now the gtag script is loaded directly from the script file.

goodideagiver commented 1 year ago

What's causing vercel error?

Willaiem commented 1 year ago

Seems it couldn't find the partytown package. obraz

That's weird because I tested the production build and it's building and working flawlessly.

Willaiem commented 1 year ago

I'll add the partytown package manually and see if this changes anything.

Willaiem commented 1 year ago

Okay, it seems the partytown plugin import wasn't there, so I had to add it.

Willaiem commented 1 year ago

Before: obraz

After: obraz

Neat.

goodideagiver commented 1 year ago

Party town might have broken g-tag, needs further investigation obraz