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

Add custom events for the analytics tracking box during setup #1049

Closed
marrrmarrr opened this issue Jan 16, 2020 · 9 comments
Closed

Add custom events for the analytics tracking box during setup #1049

marrrmarrr opened this issue Jan 16, 2020 · 9 comments
Milestone

Comments

@marrrmarrr
Copy link
Collaborator

marrrmarrr commented Jan 16, 2020

Feature Description

We need an additional custom dimension to understand what percentage of site owners opted in to the anonymous tracking within the plugin.


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

Add custom dimensions to keep track of whether site owners opt in for anonymous tracking.

  1. Whenever a user checks the "Help us improve.." box during setup from the Plugins page
    Type: Event
    Trigger: Click
    Category: tracking_plugin
    Action: analytics_optin_setup_banner

  2. Whenever a user checks the "Help us improve.." box to opt in during setup from the landing page:
    Type: Event
    Trigger: Click
    Category: tracking_plugin
    Action: analytics_optin_setup_fallback

  3. Whenever a user checks the "Help us improve.." box to opt in during setup from the Settings page:
    Track type: Event
    Trigger: Click
    Category: tracking_plugin
    Action: analytics_optin_settings_page

Implementation Brief

Depends on #1055

  • When opting in, enable tracking with new enableTracking() utility and call sendTrackingEvent() with the proper event data
  • Update <Optin> to accept a new optinAction prop, which would contain the value to pass as the event action in the tracking event
  • Update consuming components of <Optin> to pass the appropriate optinAction
    • <ActivationMain> as analytics_optin_setup_banner
    • <SettingsAdmin> as analytics_optin_settings_page
    • <SetupUsingProxy> as analytics_optin_setup_fallback
    • <WizardStepAuthentication> as analytics_optin_setup_fallback

QA Brief

  • Install Tag Assistant Chrome extension
  • Check that checking/enabling the tracking opt-in tracks the following events in Tag Assistant
    Click
    image
    Click into "Events" at the bottom to see the event category and action
    image
    image
  • All event should have the same tracking_plugin for the event category
  • Checking the opt-in from the plugin activation notice should add an event with the analytics_optin_setup_banner action
  • Checking the opt-in from the plugin setup/splash page should add an event with the analytics_optin_setup_fallback action
    • Same for the legacy non-proxy setup wizard (must provide GCP client ID and secret to reach this)
  • Checking the opt-in from the plugin settings page should add an event with the analytics_optin_settings_page action

Changelog entry

  • N/A
@marrrmarrr marrrmarrr added P1 Medium priority Type: Enhancement Improvement of an existing feature labels Jan 16, 2020
@aaemnnosttv aaemnnosttv self-assigned this Jan 16, 2020
@aaemnnosttv
Copy link
Collaborator

@marrrmarrr a few questions for you about this:

  • How should the before-click state of the opt-in influence this?
    • If the user was opted out and is opting in, I would imagine we track that
    • If the user was opted in and is opting out, do we track that as well?
    • If we track both, does that change the event data at all or it should be the same in both cases?

@felixarntz
Copy link
Member

@aaemnnosttv For now, we should only track when somebody opts in (basically anytime somebody enables the checkbox).

@felixarntz
Copy link
Member

@aaemnnosttv I like the ideas from the IB, they seem closely related to the #1055 work though. Can we include them there instead? We can leave this issue here as blocked, and focus on the necessary infrastructure first.

@felixarntz
Copy link
Member

@aaemnnosttv Whenever you get to it, can you revise this IB based on the implementation for #1055?

@felixarntz felixarntz removed their assignment Jan 23, 2020
@ThierryA ThierryA removed the Size: XS label Feb 3, 2020
@felixarntz
Copy link
Member

IB ✅

@felixarntz felixarntz removed their assignment Feb 5, 2020
@eclarke1 eclarke1 added this to the Sprint 17 milestone Feb 12, 2020
@felixarntz felixarntz changed the title Add a custom dimension for the analytics tracking box during setup Add custom events for the analytics tracking box during setup Feb 12, 2020
@eclarke1 eclarke1 modified the milestones: Sprint 17, Sprint 18 Feb 28, 2020
@felixarntz felixarntz removed their assignment Mar 5, 2020
@aaemnnosttv aaemnnosttv added the QA: Eng Requires specialized QA by an engineer label Mar 10, 2020
@cole10up cole10up removed their assignment Mar 11, 2020
@cole10up
Copy link

Confirmed the latest build functions.

Installed Tag Assistant.

image

Need Dev assistance, as I'm not seeing what is shown on the QA brief

@aaemnnosttv
Copy link
Collaborator

aaemnnosttv commented Mar 11, 2020

You need to click Record first before Tag Assistant can inspect/observe events on the page. This is only needed at the beginning, not on every single page view.

Edit: it looks like you just needed to reload the page after initially enabling Tag Assistant.

@cole10up
Copy link

Tested

Checked Tag Assistant on the Activation page via Dashboard
image

Activation via Plugins page
image

Settings page:
image

Passed QA ✅

@cole10up cole10up removed their assignment Mar 12, 2020
@marrrmarrr
Copy link
Collaborator Author

Verified these events are recorded in GA as well. LGTM

@marrrmarrr marrrmarrr removed P1 Medium priority QA: Eng Requires specialized QA by an engineer Type: Enhancement Improvement of an existing feature labels Mar 12, 2020
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

No branches or pull requests

6 participants