Skip to content

Add analytics tracking to share buttons [WT-1644] - #1745

Open
stephaniehobson wants to merge 3 commits into
mainfrom
ffr-events-WT-1644
Open

Add analytics tracking to share buttons [WT-1644]#1745
stephaniehobson wants to merge 3 commits into
mainfrom
ffr-events-WT-1644

Conversation

@stephaniehobson

@stephaniehobson stephaniehobson commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

One-line summary

Track referral share buttons as widget_action in analytics.

Testing

  • Open the referral share page (steps below if you don't already have one locally)
    • Pull down the production database locally
    • Open nightly
    • Turn your VPN to US
    • Pick "Share Nightly" to open the referral page.
    • Change the domain to localhost:8000
  • Click each button
  • Log the dataLayer in your console and see that there is an event for each one

@codecov

codecov Bot commented Aug 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.29%. Comparing base (a9c1ad8) to head (b5a3ca4).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1745   +/-   ##
=======================================
  Coverage   88.29%   88.29%           
=======================================
  Files         180      180           
  Lines       12736    12736           
=======================================
  Hits        11245    11245           
  Misses       1491     1491           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@stephaniehobson stephaniehobson changed the title Add cta tracking to referral share buttons [WT-1644] Add analytics tracking to share buttons [WT-1644] Aug 18, 2026
);

if (clipboardEl) {
clipboardEl.addEventListener('click', () => {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should we track successful copy with writeText().then() instead? Currently, if an icon/a label is missing, the copy action will fail but click will still happen.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Comment thread media/js/cms/pages/flare-referral-hub.es6.js Outdated
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.

2 participants