Skip to content

add xcust component id to affiliated links#15469

Open
oliverabrahams wants to merge 3 commits intomainfrom
oa/add-component-id-to-skimlinks
Open

add xcust component id to affiliated links#15469
oliverabrahams wants to merge 3 commits intomainfrom
oa/add-component-id-to-skimlinks

Conversation

@oliverabrahams
Copy link
Contributor

What does this change?

  • Adds a new data parameter data-x-cust-component-id to the link elements in filter components.
  • It is read by the enhance affiliate links island, which then ads the component id to the affiliated links.

Why?

  • This will improve reporting for the affiliate links.
  • We will be able to track component specific clicks in skimlinks.
  • I choose to use a new attribute data-x-cust-component-id rather than tracing up the tree to find the nearest parent with a data-component. This was because the tree crawling would have to happen for every link and it could be quite slow on a page with ~50 links.

@github-actions
Copy link

github-actions bot commented Mar 3, 2026

Hello 👋! When you're ready to run Chromatic, please apply the run_chromatic label to this PR.

You will need to reapply the label each time you want to run Chromatic.

Click here to see the Chromatic project.

@oliverabrahams oliverabrahams added the feature Departmental tracking: work on a new feature label Mar 3, 2026
@oliverabrahams oliverabrahams added the run_chromatic Runs chromatic when label is applied label Mar 5, 2026
@github-actions github-actions bot removed the run_chromatic Runs chromatic when label is applied label Mar 5, 2026
Copy link
Contributor

@charleycampbell charleycampbell left a comment

Choose a reason for hiding this comment

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

Looks good to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Departmental tracking: work on a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants