ampproject / ampproject/amphtml
Transfer data-vars-* from anchor links to their tooltip
- Dominant language
- JavaScript
- Stars
- 14.9k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
### Description
It's a useful feature to be able to add data-vars- to elements (https://github.com/ampproject/amphtml/blob/main/extensions/amp-story/amp-story-analytics.md#variables-as-data-attribute) in order to send additional parameters to analytics when they are clicked. Unfortunately, it's not possible to add these to link tooltips, which are something people often want to track.
I propose copying `data-vars-` from the `` element on to the `a.i-amphtml-story-tooltip` element so that the same vars are available when clicking out to the link.
### Alternatives Considered
I don't think there are any alternatives at the moment.
### Additional Context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.