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

Enable anonymous tracking on the Docs Site Analytics #1331

Closed
2 of 5 tasks
jpvajda opened this issue Mar 15, 2021 · 11 comments · Fixed by newrelic/gatsby-theme-newrelic#343
Closed
2 of 5 tasks

Enable anonymous tracking on the Docs Site Analytics #1331

jpvajda opened this issue Mar 15, 2021 · 11 comments · Fixed by newrelic/gatsby-theme-newrelic#343
Assignees
Labels
eng issues related to site functionality that requires engineering enhancement New feature or request

Comments

@jpvajda
Copy link

jpvajda commented Mar 15, 2021

Related Issue #1176

Issue

both Docs Site Traffic and JP site traffic have dropped significantly since the launch of our new Docs Site. This is causing confusing as it's a large drop in overall traffic being reported in GA.

Assessment

After talking through it, we believe the decrease in page views is related to the new GDPR cookie acceptance process a user goes through when they first visit the site. Given many users already accepted the cookie for the old process (Intercom) when visiting the new site they need to accept these cookies again. Looking at NR browser data, for the same time period there is a similar pattern that may prove this assumption correct. So we'd like to enable anonymous tracking in GA to capture analytics data from users who haven't yet accepted a cookie for the site or who choose not accept the cookie.

Approach

Recap:

  1. (Clicks NO) IF a user doesn't accept cookies, Tessen will not be used to send data to Segment, but we'll be able to send anonymized data to GA directly.

  2. (Never Clicks YES / NO) IF a user doesn't accept cookies, Tessen will not be used to send data to Segment, but we'll be able to send anonymized data to GA directly.

  3. (Clicks YES) IF a user accept accept cookies, Tessen will e used to send data to Segment.
    docs_staging segment source destinations will anonymize IP addresses when sending to google analytics And we will be excluding IP addresses from data sent to Snowflake.

Acceptance Criteria

@jerelmiller
Copy link
Contributor

Would it be worth instrumenting the cookie banner to see how many are accepting/denying the cookie consent? That might also help us determine whats causing the dip.

@jpvajda
Copy link
Author

jpvajda commented Mar 15, 2021

@jerelmiller i think that's a good idea.

@jpvajda jpvajda changed the title Docs Site Analytics Research Spike Docs Site Analytics Research Spike Mar 16, 2021
@jpvajda jpvajda self-assigned this Mar 16, 2021
@jpvajda jpvajda removed their assignment Mar 17, 2021
@tariqahmed
Copy link

It's worth ruling in/out the cookie consent thing - but my gut is that most people are conditioned to clicking on the cookie consent thing - as trying to use any site requires it.

What's different since moving to the new Docs site is that we go through Segment.IO, which then passes on to GA. Thus one easy experiment is to temporarily disable Segment, and substitute in the GA code directly (still using the right tracker ID). You'll see within an hour if that makes a difference or not. If it does...then you know it's something going on at the Segment level.

@jpvajda @zstix @austin-schaefer

@austin-schaefer
Copy link
Contributor

Love that idea @tariqahmed !

@jpvajda jpvajda changed the title Docs Site Analytics Research Spike Enable anonymous tracking on the Docs Site Analytics Research Spike Mar 23, 2021
@jpvajda jpvajda changed the title Enable anonymous tracking on the Docs Site Analytics Research Spike Enable anonymous tracking on the Docs Site Analytics Mar 23, 2021
@jpvajda jpvajda added eng issues related to site functionality that requires engineering enhancement New feature or request and removed research labels Mar 23, 2021
@jpvajda
Copy link
Author

jpvajda commented Mar 24, 2021

I've begun asking for input into doing this from internal teams to ensure we don't violate GDPR

@roadlittledawn roadlittledawn self-assigned this Apr 1, 2021
@roadlittledawn
Copy link
Collaborator

roadlittledawn commented Apr 7, 2021

An update on where we are on this.

Tessen and anonymous tracking

Tessen sends NR User ID and IP address to Segment, if available. I will ask tessen eng / test if not calling tessen.identify() and setting segment option identifiable to false prevents that. Worth noting that once it's in Segment, you can exclude that info in each destination (Snowflake, Google Analytics).

docs_staging database

I let Zoe know that the only source the docs site reports to is Docs (All Env) (recently renamed to Docs.Newrelic.Com (PROD)). The underlying name for that source is docs_staging (which is also the database name you query against in periscope). She is going to look into querying that for the data she's looking for.

OSS and dev segment sources

OSS and developer sites are going to report to each their own source.

  • developer: nr_oss_dev_staging
  • opensource: nr_oss_dev_production

env not reporting

I noticed that the theme is setup to read the env and report that (like it did in Drupal) so we can distinguish prod, dev, local env records in segment and beyond (since the sites only report to one source for any env it's running in). Filed issue for that: newrelic/gatsby-theme-newrelic#339

@roadlittledawn
Copy link
Collaborator

FWIW. i have a branch that adds the google analytics code by itself (with anonymize IP option set to true) if a user declines the cookie consent. seems to work so far. it would still need a bit of refactor to more closely follow the pattern that tessen uses

@jpvajda
Copy link
Author

jpvajda commented Apr 8, 2021

@roadlittledawn can you elaborate on the refactor a bit? I'm just curious what that work is and if we need to create a ticket for that work.

@jpvajda
Copy link
Author

jpvajda commented Apr 8, 2021

@roadlittledawn how difficult would it be to enable this anon tracking on our Dev and OSS sites, now that they are hooked into Segment and send data through the analytics pipeline I'm thinking it would make sense to enable this on those sites as well.

@jpvajda
Copy link
Author

jpvajda commented Apr 9, 2021

question to answer

Does tessen have something we need to set to NOT send IP data to Segment.
IF NO, does it matter to GDPR if IP data is in Segment?
IF YES, what are we supposed to?

@jpvajda jpvajda added the blocked label Apr 9, 2021
@jpvajda
Copy link
Author

jpvajda commented Apr 9, 2021

There is going to be a dicussion on Tues 4/13 about this question with a few folks in legal, so I'm putting blocked label on it, as I don't think we can move forward with finishing this work until we have that discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
eng issues related to site functionality that requires engineering enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants