amp-analytics[type=googleanalytics] encoding
See original GitHub issueTo whom it may concern:
I use amp-analytics[type=googleanalytics] to send GA beacon and I have some chinese text content filled in custom dimension.
such as the following sample code:
<amp-analytics type="googleanalytics">
<script type="application/json">
"vars": {
"account": "UA-74300583-2",
"documentGroup": "itemPage",
"merchandiseId": "100347591196",
"level1Id": "1234567890-1",
"level2Id": "1234567890-2",
"level3Id": "1234567890-3",
"level4Id": "1234567890-4",
"level5Id": "1234567890-5",
"level6Id": "1234567890-6",
"level1Name": "中文分類測試-1",
"level2Name": "中文分類測試-2",
"level3Name": "中文分類測試-3",
"level4Name": "中文分類測試-4",
"level5Name": "中文分類測試-5",
"level6Name": "中文分類測試-6"
},
"extraUrlParams": {
"cg1": "${documentGroup}",
"cd1": "${level1Id}",
"cd2": "${level2Id}",
"cd3": "${level3Id}",
"cd4": "${level4Id}",
"cd5": "${level5Id}",
"cd6": "${level6Id}",
"cd7": "${level1Name}",
"cd8": "${level2Name}",
"cd9": "${level3Name}",
"cd10": "${level4Name}",
"cd11": "${level5Name}",
"cd12": "${level6Name}",
"cd13": "${merchandiseId}"
},
"triggers": {
"pageview": {
"on": "visible",
"request": "pageview"
}
}
</script>
</amp-analytics>
Notice the level1Name ~ level6Name, these are chinese content. I check the beacon content when page refresh and I found the parameter cd7 ~ cd12 will encode the content. So Google Analytics report will collect the encoded data and hard to recognize.
You can also click the following link to check it. Demo page
Have a nice day.
Paul
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Documentation: <amp-analytics> - amp.dev
Usage. The <amp-analytics> component specifies a JSON configuration object that contains the details for what to measure and where to send analytics data....
Read more >Google AMP - Analytics - Tutorialspoint
Google AMP - Analytics, Amp analytics is an amp component used to track data on a page. All the user interaction on the...
Read more >Google Analytics for AMP (Accelerated Mobile Pages)
AMP (Accelerated Mobile Pages) means a structure that is coded according to specific guidelines and provides users with a faster browsing ...
Read more >How to set up Google Analytics - How to AMP - YouTube
In this episode of How to AMP, we go over how to set up Google Analytics for a hiking blog. Analytics help us...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This will go to canary release next week, where you can test by opt-in canary. One week after that, it will hit prod.
hi, @lannka:
I chceked my GA report and found this double encoding issue happen again. Looks like code had been rollback.
Could you reopen this issue or should I need to apply a new issue for this ?
Have a nice day.
Paul