GCTC-NTGC / gc-digital-talent

GC Digital Talent is the new recruitment platform for digital and tech jobs in the Government of Canada. // Talents numériques du GC est la nouvelle plateforme de recrutement pour les emplois numériques et technologiques au gouvernement du Canada.
https://talent.canada.ca
GNU Affero General Public License v3.0
21 stars 8 forks source link

Set up Analytics for IAP #3219

Closed tristan-orourke closed 2 years ago

tristan-orourke commented 2 years ago

Description

Upgrade the existing GA account from v3 to v4 and apply to the app as well as TC-report. Share analytics about the IAP page with IAP team.

Background.

The IAP team has requested the ability to track page views.

First, we should check if Azure already provides traffic analytics from which we could create reports for them.

If that is not possible, we should set up a Google Analytics account. From a cursory look at the account structure, we may want to create a separate "property" for IAP.

We will want to configure this to collect minimal data, and then add the necessary script to the IAP landing page.

In the future, we will likely want to set this up on all our pages (probably under different "properties" if using Google Analytics), but we can start with a minimal implementation, just on the IAP homepage.

tristan-orourke commented 2 years ago

Should be possible to use Azure Monitor Logs and KQL to generate a report which shows the number of unique visitors to a page over time.

patcon commented 2 years ago

Summary of planning convo:

Considerations:

Azure:

Potential To Do

Google Analytics:

Open Questions:

patcon commented 2 years ago

Update: Note that Universal Analytics (v4) is only deprecated in favour of v5. From the GA dashboard banner:

Universal Analytics will no longer process new data in standard properties beginning July 1, 2023. Prepare now by setting up and switching over to a Google Analytics 4 property.

So we still have a year, if there's any trouble with v5. (and we don't need to upgrade tc-report urgently, if it's a challenge)

cc: @esizer

esizer commented 2 years ago

Update: Note that Universal Analytics (v4) is only deprecated in favour of v5. From the GA dashboard banner:

I can't read, thought it was 2022 😜

tristan-orourke commented 2 years ago

Azure equivalent to GA: https://docs.microsoft.com/en-us/azure/azure-monitor/app/app-insights-overview. Add Insights to code with https://docs.microsoft.com/en-us/azure/azure-monitor/app/javascript?tabs=snippet

brindasasi commented 2 years ago

In order to add instrumentation in the code , I should be able to create an Application Insights resource in portal.azure.com and get the connection string of it. I don't have permission to do that currently and I've requested access via jira (AZ-13533 ). Until then this is blocked.

brindasasi commented 2 years ago

Got the access as below :

Morin, Philippe on 2022-08-02 8:47 AM

I've created app Insight "TalentCloud" and linked it to a new log analytics workspace "TalentAppInsights". Both located in your talent_2_paas RG. Depending how much data you gather, there is a cost for ingesting and retaining data. By default you get 30 days free retention. If that's not enough, we can increase it.

I've given you log analytics contributor role to your workspace and contributor role to AppInsights.

patcon commented 2 years ago

Pls consider updating https://go.talent.c4nada.ca/inventory for azure