Tracking Core Web Vitals in AMP using Google Analytics doesn't work
See original GitHub issueDescription
I added web vitals tracking in code but since then page-views tracking stopped working. Created a test page, please let me know where the issue is.
https://m.economictimes.com/amp_test.cms (PV tracking working) https://m.economictimes.com/amp_test.cms?web_vital=1 (PV tracking not working)
The only difference in the second url is, extraUrlParams has been added to track core web vitals tracking along with page views body as suggested by amp.dev
"extraUrlParams": {
"lcp": "${largestContentfulPaint}",
"cls": "${cumulativeLayoutShift}",
"fid": "${firstInputDelay}"
}
Reproduction Steps
Please check network log of analytics for the given url. Page views are not getting logged.
Browser(s) Affected
Chrome
OS(s) Affected
Android 11
AMP Version Affected
012105150310000
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Core Web Vitals report - Search Console Help - Google Support
The Core Web Vitals report shows URL performance grouped by status (Poor, Need improvement, Good), metric type (CLS, FID, LCP), and URL group...
Read more >Adding support for Google Analytics's Core Web Vitals amp ...
Google added Core Web Vitals support to Analytics, it'd require... ... You can use amp-analytics to track the 3 Core Web Vital metrics...
Read more >Example: Tracking Core Web Vitals - amp.dev
AMP developers can measure Core Web Vitals metrics through the amp-analytics component. ... Tracking Core Web Vitals in AMP using Google Analytics.
Read more >Google Analytics & AdSense Don't Get a Core Web Vitals Pass
Loren Baker, founder of Search Engine Journal noted that Google Analytics, Google Ads, Google Tags can negatively affect core web vitals scores.
Read more >Core-Web-Vitals Analytics for AMP site - WordPress.org
Ensure you insert googleanalytics as the type, as there are numerous Analytics vendors that support AMP. After you've inserted your Analytics snippet manually, ......
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
@scaledrop Hi… When you hit this URL
Reproduction Steps If you go to another tab and then come back to your original tab analytics data is present in Dev Tool> Network
https://amp.dev/documentation/components/amp-analytics/#vars
Thank you @micajuine-ho @abhiz10 for your inputs. Closing this thread since we got a another reference of similar open issue