ampproject / ampproject/amphtml
Allow variable substitution on data-param-* attributes
- Dominant language
- JavaScript
- Stars
- 14.9k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
## Describe the new feature or change to an existing feature you'd like to see
Since data-param-* attributes will be added as a query parameter for URLs, would be nice to allow variable substitution for them when they are added as query params.
## Additional context
I ran into this need when adding embed_config attribute for amp-youtube, I need to include a value stored in an AMP variable, something like this:
```
```
And the variable is not substituted on the parameter of the request, the URL keeps literally "${ampVariableName}"
```
https://www.youtube.com/get_video_info?html5=1&video_id=i3LHatq2u4k&embed_config={"adsConfig":{"adTagParameters":{"rdp":"${ampVariableName}"}}}
```
Contributor guide
Assessment
This issue has not been assessed yet.