Skip to content

Conversation

@OpenStaxClaude
Copy link
Contributor

Summary

Adds analytics tracking attributes to important funnel events that were not being tracked in analytics. With the analytics helper, we just need to add data-analytics-link or data-analytics-nav attributes to enable link click tracking.

Changes

"Using this book?" and "Sign up to learn more" buttons

  • File: src/app/pages/details/common/let-us-know/let-us-know.tsx
  • Added data-analytics-link attribute to the <a> tag in the ButtonWithIcon component

Assignable page CTAs (3 links in top section)

  • File: src/app/pages/assignable/sections/banner/banner.tsx
  • Added data-analytics-nav="Assignable CTAs" to the button-row container div

Tech partner list on instructor resources tab

  • File: src/app/pages/details/desktop-view/instructor-resource-tab/partners/partners.tsx
  • Added data-analytics-nav={title} to the blurb-scroller div that contains the partner list items

"Buy print" / "Bookstore order" section

  • File: src/app/pages/details/common/get-this-title-files/order-print-copy/order-print-copy.tsx
  • Added data-analytics-nav="Order print copy" to the <nav> element

Test Plan

  • Verify analytics tracking is working for "Using this book?" button on book details pages
  • Verify analytics tracking for "Sign up to learn more" button on book details pages
  • Test all 3 CTA buttons on the assignable landing page are tracked
  • Confirm partner links in the instructor resources tab are tracked
  • Check "Buy print" and "Order options" links are tracked

Related

Jira: https://openstax.atlassian.net/browse/CORE-1462

🤖 Generated with Claude Code

This commit adds analytics tracking attributes to important funnel events
that were not being tracked. These changes enable link click tracking via
the analytics helper by adding data-analytics-link or data-analytics-nav
attributes.

Changes:
- Added data-analytics-link to "Using this book?" and "Sign up to learn more" buttons
- Added data-analytics-nav to assignable page CTAs container (3 buttons)
- Added data-analytics-nav to tech partner list items container
- Added data-analytics-nav to "Order print copy" section

JIRA: https://openstax.atlassian.net/browse/CORE-1462

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
@TomWoodward TomWoodward marked this pull request as ready for review January 7, 2026 18:13
@TomWoodward TomWoodward requested a review from Copilot January 7, 2026 18:13
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds analytics tracking attributes to key funnel conversion points across the OpenStax website to improve data collection for important user interactions.

  • Added data-analytics-link to "Using this book?" and "Sign up to learn more" buttons
  • Added data-analytics-nav to assignable page CTAs, tech partner lists, and print ordering sections
  • Enables automatic link click tracking without additional JavaScript implementation

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/app/pages/details/common/let-us-know/let-us-know.tsx Added data-analytics-link to ButtonWithIcon component for tracking adoption and interest form links
src/app/pages/assignable/sections/banner/banner.tsx Added data-analytics-nav="Assignable CTAs" to button-row container for tracking three CTA buttons
src/app/pages/details/desktop-view/instructor-resource-tab/partners/partners.tsx Added data-analytics-nav={title} to blurb-scroller container for tracking partner link interactions
src/app/pages/details/common/get-this-title-files/order-print-copy/order-print-copy.tsx Added data-analytics-nav="Order print copy" to nav element for tracking print purchase links

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

<div
className="blurb-scroller"
data-analytics-content-list={title}
data-analytics-nav={title}
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

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

The blurb-scroller div now has both data-analytics-content-list and data-analytics-nav attributes set to the same value (title). This creates redundant tracking and may lead to duplicate analytics events being fired for the same interaction. Consider whether both attributes are necessary, or if only one should be used for this element. Additionally, note that the parent title-bar div (line 48) already has data-analytics-nav={title}, which may create overlapping tracking contexts.

Suggested change
data-analytics-nav={title}

Copilot uses AI. Check for mistakes.
The blurb-scroller div already uses the content selection pattern with
data-analytics-content-list and each PartnerCard has the proper
data-analytics-select-content attributes. Adding data-analytics-nav
would create duplicate tracking events.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
@TomWoodward TomWoodward merged commit e575fa3 into main Jan 7, 2026
1 check passed
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