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
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.

1 participant