cds-snc / notification-planning

Project planning for GC Notify Team
4 stars 0 forks source link

Fix issues with Google Analytics for Notify #90

Open EliseKa opened 2 years ago

EliseKa commented 2 years ago

Description

We want Google Analytics to collect reliable data. There are a few issues to resolve to make the analytics data more reliable:

~~1. URLs for the Notify website are not bilingual. Impact: we can't analyze data by url to get insights about experience variations with language. The workaround is to analyze based on page titles, which is less reliable because page titles can change over time.~~ Not in scope anymore.

2. Google Analytics records internal traffic from CDSers. Impact: Data does not accurately represent how users navigate the website. There is no perfect solution since we all use a VPN, but we can at least filter out traffic from people logged in as admin users.

3. Google Analytics doesn’t record URL changes for the API documentation website. Impact: A single URL records traffic happening on other pages. This is shown in this Google Analytics screenshot, where for the https://documentation.notification.canada.ca/en/start url, there are many corresponding page titles, although there should only be "Get started". Capture d’écran, le 2022-04-25 à 15.45.16.png

Acceptance criteria

EliseKa commented 2 years ago

Met with Lucas this week. Takeaways are:

EliseKa commented 2 years ago

Write-up of Google Analytics issues

yaelberger-commits commented 2 years ago

@EliseKa will update this card to remove bilingual URL issues Yael can create a new epic for Google Analytics

yaelberger-commits commented 2 years ago

@EliseKa will update this card to remove bilingual URL issues Yael can create a new epic for Google Analytics

EliseKa commented 2 years ago

@yaelberger-commits I updated this card to reflect recent re-scoping about bilingual URLs, and refined the best I could the remaining couple issues.

I believe Steve said he had an idea for how we can filter out admin users. For the other issue with the API documentation (which uses VuePress), it may need further refinement as I don't know what the solution is.

I'm un-assigning myself for now as this is dev work, but I can contribute to QA later and can also give more details if needed. Priority can probably shift to Low, but I leave that to you! :)

yaelberger-commits commented 2 years ago

Thanks @EliseKa! I unassigned you.

andrewleith commented 11 months ago

An idea for "A solution is in place to filter out traffic from Notify admins.":

andrewleith commented 10 months ago

Fixes were implemented to only record stats from non-cds users and only in production: https://github.com/cds-snc/notification-admin/pull/1683

andrewleith commented 10 months ago

In trying to get some stats for the docs site, I don't see anything recorded at all for that hostname. More work needs to be done if we want to be collecting GA stats for the docs site.

EliseKa commented 10 months ago

@andrewleith I noticed the same, it seems that since the migration to GA4, it is not tracking anything from the API documentation website anymore.