{"id":14205,"date":"2019-09-16T06:41:27","date_gmt":"2019-09-16T06:41:27","guid":{"rendered":"https:\/\/ampforwp.com\/tutorials\/?post_type=ht_kb&#038;p=14205"},"modified":"2020-05-08T06:16:23","modified_gmt":"2020-05-08T06:16:23","slug":"how-to-add-multiple-google-analytics-in-amp","status":"publish","type":"ht_kb","link":"https:\/\/ampforwp.com\/tutorials\/article\/how-to-add-multiple-google-analytics-in-amp\/","title":{"rendered":"How to add Multiple Google Analytics in AMP"},"content":{"rendered":"\n<p>If you want to add multiple Google analytics to AMP pages. then  In this tutorial, I am going to show you how to add multiple Google Analytics in AMP pages for this follow the below steps.<\/p>\n\n\n\n<p>Copy below code and paste it in the Analytics Code in JSON Format. Check below example for the exact placement details. Before placing below code, replace <strong>UA-XXXXX-Y<\/strong> with your Google Analytics tracking code.<br><br><\/p>\n\n\n\n<p><strong>For example:<\/strong><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;php&quot;,&quot;mime&quot;:&quot;text\/x-php&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;PHP&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;php&quot;}\">{\n    &quot;triggers&quot;: {\n        &quot;trackPageview&quot;: {\n            &quot;on&quot;: &quot;visible&quot;,\n            &quot;request&quot;: &quot;pageview&quot;,\n            &quot;vars&quot;: {\n              &quot;account&quot;: &quot;ABC123&quot;\n            }\n        },\n        &quot;trackPageview2&quot;: {\n            &quot;on&quot;: &quot;visible&quot;,\n            &quot;request&quot;: &quot;pageview&quot;,\n            &quot;vars&quot;: {\n              &quot;account&quot;: &quot;PQR987&quot;\n            },\n        }\n    }\n}<\/pre><\/div>\n\n\n\n<p>You will find this option in the <strong>WordPress Dashboard<\/strong> -&gt; <strong>AMP option Panel <\/strong>-&gt; <strong>Settings<\/strong> -&gt; <strong>Analytic<\/strong> -&gt; Enable &#8220;<strong>Google Analytics<\/strong>&#8221; option -&gt; Enable &#8220;<strong>Advanced Google Analytic<\/strong>&#8221; and then click on the &#8220;<strong>Save Changes<\/strong>&#8221; button. like below the screenshot.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"500\" src=\"https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/09\/multiple-analytic-2-1024x500.png\" alt=\"\" class=\"wp-image-14208\" srcset=\"https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/09\/multiple-analytic-2-1024x500.png 1024w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/09\/multiple-analytic-2-300x146.png 300w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/09\/multiple-analytic-2-768x375.png 768w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/09\/multiple-analytic-2-50x24.png 50w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/09\/multiple-analytic-2-60x29.png 60w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/09\/multiple-analytic-2-100x49.png 100w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/09\/multiple-analytic-2.png 1358w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Now Successfully add mutiple Google Analytic in AMP.<\/p>\n\n\n\n<p><strong>That\u2019s it for this tutorial!<\/strong><\/p>\n\n\n\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 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>If you want to add multiple Google analytics to AMP pages. then In this tutorial, I am going to show you how to add multiple Google Analytics in AMP pages for this follow the below steps. Copy below code and paste it in the Analytics Code in JSON Format. Check&#8230;<\/p>\n","protected":false},"author":18,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":[],"ht-kb-category":[34],"ht-kb-tag":[],"_links":{"self":[{"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb\/14205"}],"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\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/comments?post=14205"}],"version-history":[{"count":8,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb\/14205\/revisions"}],"predecessor-version":[{"id":17288,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb\/14205\/revisions\/17288"}],"wp:attachment":[{"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/media?parent=14205"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb-category?post=14205"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb-tag?post=14205"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}