Skip to content

WT-1025 Add Ability To Track Button Clicks In Anonym#17140

Merged
kkellydesign merged 15 commits intomainfrom
WT-1025-button-tracking
Apr 30, 2026
Merged

WT-1025 Add Ability To Track Button Clicks In Anonym#17140
kkellydesign merged 15 commits intomainfrom
WT-1025-button-tracking

Conversation

@dchukhin
Copy link
Copy Markdown
Collaborator

@dchukhin dchukhin commented Apr 16, 2026

If this changeset needs to go into the FXC codebase, please add the WMO and FXC label.

This pull request adds data-cta-text and data-cta-id to anonym buttons.

One-line summary

Significant changes and points to review

Specifically,

  • a UUIDBlock has been added to bedrock/cms/blocks.py (mirroring the block in springfield)
  • UUIDBlocks are used in anonym's LinkWithTextBlock and CaseStudyItemWithAnalyticsBlock
  • NavigationLinkBlock now has an analytics_id field
  • AnonymNewsItemPage now has an analytics_id field
  • new values for these fields are populated in a data migration

Issue / Bugzilla link

WT-1025

Testing

  1. run the migrations on this branch
  2. test the pages mentioned in the JIRA ticket, to make sure the expected buttons have data-cta-text and data-cta-uid properties
    a. anonym homepage (http://localhost:8000/en-US/anonym/) “How it Works >” Link, “About Us >“ link, “Contact Us“ button on homepage content (not navigation); “LinkedIn” link on bottom-of-page banner
    b. 3 “Case Study” buttons and “Contact Us” button
    c. "Contact Us“ button
    d. all News links
  3. verify that you can update all of these uuid values in Wagtail

@dchukhin dchukhin requested review from a team as code owners April 16, 2026 20:55
@dchukhin dchukhin requested a review from kkellydesign April 16, 2026 21:02
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 16, 2026

Codecov Report

❌ Patch coverage is 96.57534% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.98%. Comparing base (f87ea39) to head (c885ab4).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...ment/commands/populate_case_study_analytics_ids.py 88.23% 4 Missing ⚠️
...ment/commands/populate_nav_button_analytics_ids.py 95.65% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #17140      +/-   ##
==========================================
+ Coverage   81.76%   81.98%   +0.22%     
==========================================
  Files         175      179       +4     
  Lines        9381     9526     +145     
==========================================
+ Hits         7670     7810     +140     
- Misses       1711     1716       +5     

☔ View full report in Codecov by Sentry.
📢 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.

Copy link
Copy Markdown
Collaborator

@kkellydesign kkellydesign left a comment

Choose a reason for hiding this comment

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

Works for me 👍

@kkellydesign kkellydesign merged commit 2b69773 into main Apr 30, 2026
5 checks passed
@kkellydesign kkellydesign deleted the WT-1025-button-tracking branch April 30, 2026 19:35
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