{"id":734,"date":"2016-11-07T08:57:26","date_gmt":"2016-11-07T08:57:26","guid":{"rendered":"https:\/\/ampforwp.com\/?p=734"},"modified":"2020-02-14T11:01:16","modified_gmt":"2020-02-14T11:01:16","slug":"how-to-add-google-analytics-to-amp","status":"publish","type":"ht_kb","link":"https:\/\/ampforwp.com\/tutorials\/article\/how-to-add-google-analytics-to-amp\/","title":{"rendered":"How to Add Google Analytics to AMP"},"content":{"rendered":"<p style=\"text-align: justify;\">In today\u2019s\u00a0Blogging world publishing and understanding the audience is a heart to right articles and creating the royal readers. There should be KEY to understanding the behavior of the audience. So, AMP includes an <em>amp-analytics <\/em>element that allows publishers to track and view the behavior of visitors on the website. The publisher can automatically track visitor counts, Clicks, New Vs Returning and much more on AMP pages.<\/p>\n<h3 style=\"text-align: justify;\">How to Add Analytics to AMP<\/h3>\n<p>Login to <a href=\"https:\/\/accounts.google.com\/ServiceLogin\/signinchooser?service=analytics&amp;passive=1209600&amp;continue=https%3A%2F%2Fanalytics.google.com%2Fanalytics%2Fweb%2F%23&amp;followup=https%3A%2F%2Fanalytics.google.com%2Fanalytics%2Fweb%2F&amp;flowName=GlifWebSignIn&amp;flowEntry=ServiceLogin\"><strong>Google<\/strong>\u00a0<strong>Analytics Account<\/strong><\/a>\u00a0\u2013&gt; Go \u00a0to \u2018<strong>Home<\/strong>\u2018 tab \u2013&gt; Copy <strong>Google<\/strong> <strong>Analytics Code<\/strong><\/p>\n<p><a href=\"https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2016\/11\/3.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-15838\" src=\"https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2016\/11\/3.png\" alt=\"\" width=\"878\" height=\"417\" srcset=\"https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2016\/11\/3.png 878w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2016\/11\/3-300x142.png 300w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2016\/11\/3-768x365.png 768w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2016\/11\/3-50x24.png 50w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2016\/11\/3-60x28.png 60w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2016\/11\/3-100x47.png 100w\" sizes=\"(max-width: 878px) 100vw, 878px\" \/><\/a><\/p>\n<p>Login to<strong> WordPress Dashboard \u2013&gt; Navigate to AMP <\/strong>(This opens the AMP settings Panel)<strong> \u2013&gt;Settings -&gt; Analytic\u00a0 -&gt;<\/strong>Enable<strong> &#8220;Google Analytics&#8221; <\/strong>option Paste the <strong>ID<\/strong> in<strong> Tracking ID Section &#8211;&gt; <\/strong>Click on the &#8220;<strong>Save Changes&#8221; <\/strong>button<strong>.<\/strong><\/p>\n<p><a href=\"https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2016\/11\/Google-analytics-id-1.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-11274\" src=\"https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2016\/11\/Google-analytics-id-1.png\" alt=\"\" width=\"1307\" height=\"402\" srcset=\"https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2016\/11\/Google-analytics-id-1.png 1307w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2016\/11\/Google-analytics-id-1-300x92.png 300w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2016\/11\/Google-analytics-id-1-768x236.png 768w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2016\/11\/Google-analytics-id-1-1024x315.png 1024w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2016\/11\/Google-analytics-id-1-50x15.png 50w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2016\/11\/Google-analytics-id-1-60x18.png 60w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2016\/11\/Google-analytics-id-1-100x31.png 100w\" sizes=\"(max-width: 1307px) 100vw, 1307px\" \/><\/a><\/p>\n<p>That&#8217;s it; Now you can Track\u00a0visitor counts, Clicks, New Vs Returning and much more on AMP pages.<\/p>\n<p><strong>Once you have added then you can also check that in your source code of the AMP pages like this screenshot.<\/strong><\/p>\n<p><a href=\"https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2016\/11\/Desktop-2020-02-14-16-25-55.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-16425\" src=\"https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2016\/11\/Desktop-2020-02-14-16-25-55.png\" alt=\"\" width=\"1365\" height=\"195\" srcset=\"https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2016\/11\/Desktop-2020-02-14-16-25-55.png 1365w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2016\/11\/Desktop-2020-02-14-16-25-55-300x43.png 300w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2016\/11\/Desktop-2020-02-14-16-25-55-768x110.png 768w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2016\/11\/Desktop-2020-02-14-16-25-55-1024x146.png 1024w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2016\/11\/Desktop-2020-02-14-16-25-55-50x7.png 50w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2016\/11\/Desktop-2020-02-14-16-25-55-60x9.png 60w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2016\/11\/Desktop-2020-02-14-16-25-55-100x14.png 100w\" sizes=\"(max-width: 1365px) 100vw, 1365px\" \/><\/a><\/p>\n<h3 style=\"text-align: justify;\">How to Add Analytics to AMP (Video)<\/h3>\n<p><iframe loading=\"lazy\" width=\"560\" height=\"315\" src=\"https:\/\/www.youtube.com\/embed\/eNExXsmEgsA\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<div>\n<p><strong>That\u2019s it for this tutorial!<\/strong><\/p>\n<\/div>\n<div>\n<div class=\"hkb-article__content\">\n<div class=\"hkb-article__content\">\n<p>We hope it helped you. If you have any feedback or questions, then please share them in the comments section below.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div id=\"div-1\" class=\"hkb-feedback\">\n\t\t\t<strong class=\"ht-mobile-exit__title\">Ask your Questions Directly!<\/strong><br>\n\t\t\t<div class=\"hkb_widget_exit__content\" style=\"font-size: 14px;\">If you can't find the solutions in this article, then just ask us in the comments and we will answer it for you!<\/div>\n\t\t\t<a href=\"https:\/\/ampforwp.com\/support\/#contact\" id=\"button\" target=\"_blank\" rel=\"noopener noreferrer\"><button>Yes, I have a Question<\/button><\/a>\n\t\t<\/div>","protected":false},"excerpt":{"rendered":"<p>In today\u2019s\u00a0Blogging world publishing and understanding the audience is a heart to right articles and creating the royal readers. There should be KEY to understanding the behavior of the audience. So, AMP includes an amp-analytics element that allows publishers to track and view the behavior of visitors on the website&#8230;.<\/p>\n","protected":false},"author":1,"comment_status":"open","ping_status":"open","template":"","format":"standard","meta":[],"ht-kb-category":[34],"ht-kb-tag":[25],"_links":{"self":[{"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb\/734"}],"collection":[{"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/comments?post=734"}],"version-history":[{"count":9,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb\/734\/revisions"}],"predecessor-version":[{"id":16426,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb\/734\/revisions\/16426"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/media?parent=734"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb-category?post=734"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb-tag?post=734"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}