Doyban / Doyban-Website

https://doyban.com
1 stars 1 forks source link

Make sure Google Analytics 4 is enabled #5

Closed danieldanielecki closed 1 year ago

danieldanielecki commented 2 years ago

Please follow https://support.google.com/analytics/answer/10759417

danieldanielecki commented 2 years ago

For now, doyban.com is using Universal Analytics (UA), but it should migrate to Google Analytics 4 (GA4).

danieldanielecki commented 2 years ago

Adding Google Tag Manager (GTM) would be the preferred way: https://support.google.com/tagmanager/answer/6103696?hl=en&topic=2574303&ctx=topic?utm_medium=email&utm_source=gtm_newbie&utm_campaign=newbie_v2&visit_id=638042161202849735-3781654693&rd=1

danieldanielecki commented 1 year ago

GTM added in https://github.com/Doyban/Doyban-Website/commit/cab0e05bd28d2e11241b88a72087c001dc2ba188, now only test once it'll go to production

danieldanielecki commented 1 year ago

until https://github.com/zadigetvoltaire/nuxt-gtm/issues/15 is fixed, it looks like we can't have it working

danieldanielecki commented 1 year ago

edit: using gtag

danieldanielecki commented 1 year ago

As of today it's working fine, but until https://github.com/zadigetvoltaire/nuxt-gtm/issues/15 is fixed we need to add manually each time to the generated index.html in .output/public. It'd be better to use Google Tag Manager. Follow up story #26.

danieldanielecki commented 1 year ago

Also, TODO in code has been marked for this improvement.

danieldanielecki commented 1 year ago

As of today it's working fine, but until zadigetvoltaire/nuxt-gtm#15 is fixed we need to add manually each time to the generated index.html in .output/public. It'd be better to use Google Tag Manager. Follow up story #26.

There's no index.html in nuxi build, see https://github.com/Doyban/Doyban-Website/commit/45559d317f19645d85bd9d652a3b2726ed2551b2 fix.