ampproject / ampproject/amphtml
variable substitutions ${canonicalUrl} cutting off urls at a comma
- Dominant language
- JavaScript
- Stars
- 14.9k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
### Description
"$DEFAULT(${canonicalUrl}, notSet)" doesn't seem to report the URLs correctly in amp-analytics. It looks like for some reason the reported urls get cut of at the comma (,)
### Reproduction Steps
e.g. https://amp.tvspielfilm.de/news/tv/tatort-neugeboren-neues-bremer-team-macht-so-weiter-wie-das-alte-aufgehoert-hat,10428438,ApplicationArticle.html
look for rt.tvspielfilm.de/collect in the network console to confirm that the reported canonical url is
https://www.tvspielfilm.de/news/tv/tatort-neugeboren-neues-bremer-team-macht-so-weiter-wie-das-alte-aufgehoert-hat
rather than
https://www.tvspielfilm.de/news/tv/tatort-neugeboren-neues-bremer-team-macht-so-weiter-wie-das-alte-aufgehoert-hat,10428438,ApplicationArticle.html
### Relevant Logs
_No response_
### Browser(s) Affected
Chrome
### AMP Version Affected
2105072136000
Contributor guide
Research direction
Start in the amp-analytics handling of the "$DEFAULT(${canonicalUrl}, notSet)" substitution and reproduce the issue with the URL in the report. Inspect the network request to rt.tvspielfilm.de/collect; done means the canonical URL remains complete, including the comma and following path text.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- analytics
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100