Analytics
2K members online now
2K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

Implementing Google Analytics for AMP

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I am in the process of creating Accelerated Mobile Pages (AMP), and I want to implement Google Analytics. I have found code on the Web, but nothing specific from Google as to the best practice for doing so. Currently, I am using the following that I found on Github

 

  
 <amp-pixel src="https://ssl.google-analytics.com/collect?v=1&amp;tid=UA-xxxxxxx-1&amp;t=pageview&amp;cid=$RANDOM&amp;dt=$TITLE&amp;dl=$CANONICAL_URL&amp;z=$RANDOM"></amp-pixel>

 

I do not see my amp page in the real time tracking in GA.

 

I do have a canonical set to the "real" HTML page; I do not know if that may be a problem when it comes to reporting.

 

Any help would be appreciated! All stop on AMP implementation until I can figure this out Smiley Happy 

1 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Thomas G
January 2016

Re: Implementing Google Analytics for AMP

Top Contributor
# 2
Top Contributor
Hi Thomas,

being no expert in this specific implementation by myself, just note that there was an announcement by Google regarding AMP support of Google Analytics [1] just yesterday.

Christoph

[1] http://analytics.blogspot.com/2016/01/announcing-ga-support-for-accelerated.html

View solution in original post

Marked as Best Answer.
Solution
Accepted by topic author Thomas G
January 2016

Re: Implementing Google Analytics for AMP

Top Contributor
# 2
Top Contributor
Hi Thomas,

being no expert in this specific implementation by myself, just note that there was an announcement by Google regarding AMP support of Google Analytics [1] just yesterday.

Christoph

[1] http://analytics.blogspot.com/2016/01/announcing-ga-support-for-accelerated.html