Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snowplow analytics plugin #149

Merged
merged 6 commits into from
Jul 29, 2024
Merged

Snowplow analytics plugin #149

merged 6 commits into from
Jul 29, 2024

Conversation

oomIRL
Copy link
Contributor

@oomIRL oomIRL commented Jun 24, 2024

Snowplow search tracking + switching existing tracking over to the analytics plugin.

Search events fire whenever search results are returned, so we get an event for nearly every keystroke.
To get around this there's some logic to only track the most recent search event after a debounce time has elapsed.
This value can be configured via the app-config. Although, right now it's coming from a default value in the analytics module.

I attempted to keep the tracking consistent with the prior method, but I have observed some changes:

  • It looks like some pageview events would fire twice occasionally. That's not happening with the backstage events, so I wouldn't be surprised if pageview counts go down as a result.
  • Previously, links clicked from techdocs weren't being tracked. Now they are for internal links, but external links aren't generating an event.
  • Some of the data attached to click events has changed. The builtin snowplow link tracking would include an array of class names from the clicked element. The Backstage events don't include this information, but do have content info like the button or link text. The Backstage events also include additional information such as entityRefs, routeRefs, pluginIds, but I didn't see anything wildly useful for our analytics.

previous click data
snowplow_click_old

backstage click data
snowplow_click_new

I've got a preview branch up here: https://f5ff48-developer-portal-dev-dprepo-pr-149-f5ff48-dev.apps.silver.devops.gov.bc.ca/
(I dropped the preview for the time being)

@oomIRL oomIRL added preview Tag with this label to build and deploy a pull-request and removed preview Tag with this label to build and deploy a pull-request labels Jun 24, 2024
@oomIRL oomIRL added the preview Tag with this label to build and deploy a pull-request label Jun 25, 2024
Copy link

@oomIRL oomIRL requested review from MonicaG and sheaphillips June 26, 2024 19:23
Copy link
Contributor

@MonicaG MonicaG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@oomIRL - thank you for the walk through!

@oomIRL oomIRL requested a review from jenreiher-bcgov July 3, 2024 20:58
Copy link
Contributor

@jenreiher-bcgov jenreiher-bcgov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nothing blocking this, but a few questions! great job :D

@oomIRL oomIRL removed the preview Tag with this label to build and deploy a pull-request label Jul 9, 2024
@oomIRL oomIRL merged commit c6ce3cc into main Jul 29, 2024
7 checks passed
@oomIRL oomIRL deleted the DEVX987-BackstageEventsTracking branch July 29, 2024 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants