Analytics optimization: different Google Analaytics tags for different routes
MrCsabaToth opened this issue · 3 comments
The index.html provides the same GA tag for each route. A SEO/analytics savvy member suggested to have different GA tags per route/page.
Expected Behavior
Different GA tags per page
Current Behavior
Same GA tag for each page
Possible Solution
Per page GA tag, like the title?
Detailed Description
First we need to discuss the validity of the request and how we can resolve it
Since this is a SPA (Single Page App) it isn't possible to have a "different tag" per page, but that is why I made the switch to use Google Tag Manager instead.
With GTM you can use any analytics product of your choice (Google Analytics, Facebook Pixel, etc.) and you don't have to edit the codebase and/or write any complex integrations.
Since you referenced GA specifically, see this guide on setting up GA with GTM on an Angular SPA.
I also just noticed that the Google Help Page I linked in the README now goes to a 404... argh
I'll update the README with the link I provided above.
I need to ask the person, because he knows what was his problem really.