{"id":23180,"date":"2021-08-04T06:36:02","date_gmt":"2021-08-04T10:36:02","guid":{"rendered":"https:\/\/plumrocket.com\/docs\/?p=23180"},"modified":"2023-05-18T08:16:46","modified_gmt":"2023-05-18T12:16:46","slug":"how-to-add-google-analytics-to-magento-2-amp-pages","status":"publish","type":"post","link":"https:\/\/plumrocket.com\/docs\/magento-amp\/v3\/integrations\/google-analytics","title":{"rendered":"How to Add Google Analytics to Magento 2 AMP Pages"},"content":{"rendered":"\n<p>In this article, you will learn how to integrate <a href=\"\/magento-amp\">Google Analytics into Magento 2 AMP Extension<\/a>. Please follow the steps below to configure it correctly.<\/p>\n\n\n\n<p>First, you need to log in to your <a href=\"https:\/\/accounts.google.com\/signin\/v2\/identifier?service=analytics&amp;passive=1209600&amp;continue=https%3A%2F%2Fanalytics.google.com%2Fanalytics%2Fweb%2F%3Fhl%3Den-GB%26pli%3D1%23&amp;followup=https%3A%2F%2Fanalytics.google.com%2Fanalytics%2Fweb%2F%3Fhl%3Den-GB%26pli%3D1&amp;hl=en-GB&amp;flowName=GlifWebSignIn&amp;flowEntry=ServiceLogin\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Analytics account<\/a>. You can use the same account for your AMP pages or create a new one. If you do not have a Google Analytics account yet, or you want to create a new one, please follow the official guide on <a href=\"https:\/\/support.google.com\/analytics\/answer\/9304153\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">how to create a Google Analytics account<\/a>. <\/p>\n\n\n\n<p>Next, make sure to <a href=\"https:\/\/support.google.com\/analytics\/answer\/9304153#property\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">set up a property in Google Analytics<\/a> for the website you want to collect data for. Please follow the quick guide below on how to get a Measurement ID and set up Google Analytics for your Magento store.<\/p>\n\n\n\n<h2 id=\"h-where-to-get-google-analytics-measurement-id\">Where to Get Google Analytics Measurement ID<\/h2>\n\n\n\n<p>In order to integrate Google Analytics into your AMP pages, you need to get your Measurement ID and paste it into Magento 2 AMP Extension backend. Please follow the steps below to find Google Analytics Measurement ID.<\/p>\n\n\n\n<div class=\"wp-block-group pr-notice pr-notice-info\"><div class=\"wp-block-group__inner-container\">\n<p class=\"pr-notice-title\">Step-by-step guide:<\/p>\n\n\n\n<ol><li>Log in to your Google Analytics account and click <strong>Admin<\/strong>. <\/li><li>Select an account from the menu in the <strong>Account<\/strong> column.<\/li><li>Select a property from the menu in the <strong>Property<\/strong> column.<\/li><li>Under Property, click <strong><strong>Data Streams<\/strong><\/strong>.<\/li><\/ol>\n<\/div><\/div>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"1024\" height=\"489\" src=\"https:\/\/plumrocket.com\/docs\/wp-content\/uploads\/2023\/05\/magento-2-amp-extension-integration-google-analytics-1-1024x489.png\" alt=\"How to get Google Analytics Measurement ID\" class=\"wp-image-26494\" srcset=\"https:\/\/plumrocket.com\/docs\/wp-content\/uploads\/2023\/05\/magento-2-amp-extension-integration-google-analytics-1-1024x489.png 1024w, https:\/\/plumrocket.com\/docs\/wp-content\/uploads\/2023\/05\/magento-2-amp-extension-integration-google-analytics-1-300x143.png 300w, https:\/\/plumrocket.com\/docs\/wp-content\/uploads\/2023\/05\/magento-2-amp-extension-integration-google-analytics-1-768x367.png 768w, https:\/\/plumrocket.com\/docs\/wp-content\/uploads\/2023\/05\/magento-2-amp-extension-integration-google-analytics-1.png 1206w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Afterward, you will be redirected to the Data Streams page, where all the configured data streams are displayed.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"1024\" height=\"486\" src=\"https:\/\/plumrocket.com\/docs\/wp-content\/uploads\/2023\/05\/magento-2-amp-extension-integration-google-analytics-2-1024x486.png\" alt=\"How to get Google Analytics Measurement ID\" class=\"wp-image-26495\" srcset=\"https:\/\/plumrocket.com\/docs\/wp-content\/uploads\/2023\/05\/magento-2-amp-extension-integration-google-analytics-2-1024x486.png 1024w, https:\/\/plumrocket.com\/docs\/wp-content\/uploads\/2023\/05\/magento-2-amp-extension-integration-google-analytics-2-300x142.png 300w, https:\/\/plumrocket.com\/docs\/wp-content\/uploads\/2023\/05\/magento-2-amp-extension-integration-google-analytics-2-768x364.png 768w, https:\/\/plumrocket.com\/docs\/wp-content\/uploads\/2023\/05\/magento-2-amp-extension-integration-google-analytics-2.png 1206w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<div class=\"wp-block-group pr-notice pr-notice-info\"><div class=\"wp-block-group__inner-container\">\n<p class=\"pr-notice-title\">Step-by-step guide:<\/p>\n\n\n\n<ol><li>Select the desired stream, and copy the <strong id=\"measurement-id\">Measurement ID<\/strong> under the &#8220;Stream details&#8221;.<\/li><\/ol>\n<\/div><\/div>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"1024\" height=\"489\" src=\"https:\/\/plumrocket.com\/docs\/wp-content\/uploads\/2023\/05\/magento-2-amp-extension-integration-google-analytics-3-1-1024x489.png\" alt=\"How to get Google Analytics Measurement ID\" class=\"wp-image-26502\" srcset=\"https:\/\/plumrocket.com\/docs\/wp-content\/uploads\/2023\/05\/magento-2-amp-extension-integration-google-analytics-3-1-1024x489.png 1024w, https:\/\/plumrocket.com\/docs\/wp-content\/uploads\/2023\/05\/magento-2-amp-extension-integration-google-analytics-3-1-300x143.png 300w, https:\/\/plumrocket.com\/docs\/wp-content\/uploads\/2023\/05\/magento-2-amp-extension-integration-google-analytics-3-1-768x367.png 768w, https:\/\/plumrocket.com\/docs\/wp-content\/uploads\/2023\/05\/magento-2-amp-extension-integration-google-analytics-3-1.png 1206w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 id=\"h-how-to-integrate-google-analytics-with-magento-2-amp-extension\">How to Integrate Google Analytics With Magento 2 AMP Extension<\/h2>\n\n\n\n<p>In the main Magento menu, go to the <strong>Plumrocket<\/strong> -&gt; <strong>AMP<\/strong> -&gt; <strong>Configuration<\/strong>, and scroll down to <strong>Integrations<\/strong> -&gt; <strong>Google Analytics<\/strong>.<\/p>\n\n\n\n<div class=\"wp-block-group pr-notice pr-notice-info\"><div class=\"wp-block-group__inner-container\">\n<p class=\"pr-notice-title\">Step-by-step guide:<\/p>\n\n\n\n<ol><li><strong>Enable<\/strong>: set to <em>Yes<\/em> to enable Google Analytics on your AMP pages.<\/li><li><strong>Analytics Version<\/strong>: choose the Google Analytics version which will be used (Google Analytics V4 is described in the documentation).<\/li><li><strong>Tracking ID<\/strong> (Account Number): insert your <a href=\"https:\/\/plumrocket.com\/docs\/magento-amp\/v3\/integrations\/google-analytics#google-analytics-tracking-id\"><\/a><a href=\"#measurement-id\">Google Analytics Measurement ID<\/a> code in this field.<\/li><li>Click <strong>Save Config<\/strong> to apply settings.<\/li><\/ol>\n<\/div><\/div>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"1024\" height=\"365\" src=\"https:\/\/plumrocket.com\/docs\/wp-content\/uploads\/2023\/05\/magento-2-amp-extension-integration-google-analytics-4-1024x365.png\" alt=\"Magento 2 AMP Extension - Google Analytics Integration\" class=\"wp-image-26497\" srcset=\"https:\/\/plumrocket.com\/docs\/wp-content\/uploads\/2023\/05\/magento-2-amp-extension-integration-google-analytics-4-1024x365.png 1024w, https:\/\/plumrocket.com\/docs\/wp-content\/uploads\/2023\/05\/magento-2-amp-extension-integration-google-analytics-4-300x107.png 300w, https:\/\/plumrocket.com\/docs\/wp-content\/uploads\/2023\/05\/magento-2-amp-extension-integration-google-analytics-4-768x274.png 768w, https:\/\/plumrocket.com\/docs\/wp-content\/uploads\/2023\/05\/magento-2-amp-extension-integration-google-analytics-4.png 1206w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Google Analytics integration with the Magento 2 AMP extension is now completed.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article, you will learn how to integrate Google Analytics into Magento 2 AMP Extension. Please follow the steps below to configure it correctly. First, you need to log in to your Analytics account. You can use the same account for your AMP pages or create a new one. If you do not have &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/plumrocket.com\/docs\/magento-amp\/v3\/integrations\/google-analytics\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;How to Add Google Analytics to Magento 2 AMP Pages&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"_mi_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[327],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v17.2 (Yoast SEO v17.2) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Add Google Analytics to Magento 2 AMP Pages - Plumrocket Documentation<\/title>\n<meta name=\"description\" content=\"In this article, you will learn how to integrate Google Analytics into Magento 2 AMP Extension. Please follow the steps below to configure it correctly.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/plumrocket.com\/docs\/magento-amp\/v3\/integrations\/google-analytics\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Add Google Analytics to Magento 2 AMP Pages\" \/>\n<meta property=\"og:description\" content=\"In this article, you will learn how to integrate Google Analytics into Magento 2 AMP Extension. Please follow the steps below to configure it correctly.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/plumrocket.com\/docs\/magento-amp\/v3\/integrations\/google-analytics\" \/>\n<meta property=\"og:site_name\" content=\"Plumrocket Documentation\" \/>\n<meta property=\"article:published_time\" content=\"2021-08-04T10:36:02+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-05-18T12:16:46+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/plumrocket.com\/docs\/wp-content\/uploads\/2023\/05\/magento-2-amp-extension-integration-google-analytics-1-1024x489.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Plumrocket\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Add Google Analytics to Magento 2 AMP Pages - Plumrocket Documentation","description":"In this article, you will learn how to integrate Google Analytics into Magento 2 AMP Extension. Please follow the steps below to configure it correctly.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/plumrocket.com\/docs\/magento-amp\/v3\/integrations\/google-analytics","og_locale":"en_US","og_type":"article","og_title":"How to Add Google Analytics to Magento 2 AMP Pages","og_description":"In this article, you will learn how to integrate Google Analytics into Magento 2 AMP Extension. Please follow the steps below to configure it correctly.","og_url":"https:\/\/plumrocket.com\/docs\/magento-amp\/v3\/integrations\/google-analytics","og_site_name":"Plumrocket Documentation","article_published_time":"2021-08-04T10:36:02+00:00","article_modified_time":"2023-05-18T12:16:46+00:00","og_image":[{"url":"https:\/\/plumrocket.com\/docs\/wp-content\/uploads\/2023\/05\/magento-2-amp-extension-integration-google-analytics-1-1024x489.png"}],"twitter_card":"summary_large_image","twitter_misc":{"Written by":"Plumrocket","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/plumrocket.com\/docs\/#website","url":"https:\/\/plumrocket.com\/docs\/","name":"Plumrocket Documentation","description":"Extensions docs, troubleshootings etc.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/plumrocket.com\/docs\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"ImageObject","@id":"https:\/\/plumrocket.com\/docs\/magento-amp\/v3\/integrations\/google-analytics#primaryimage","inLanguage":"en-US","url":"https:\/\/plumrocket.com\/docs\/wp-content\/uploads\/2023\/05\/magento-2-amp-extension-integration-google-analytics-1.png","contentUrl":"https:\/\/plumrocket.com\/docs\/wp-content\/uploads\/2023\/05\/magento-2-amp-extension-integration-google-analytics-1.png","width":1206,"height":576},{"@type":"WebPage","@id":"https:\/\/plumrocket.com\/docs\/magento-amp\/v3\/integrations\/google-analytics#webpage","url":"https:\/\/plumrocket.com\/docs\/magento-amp\/v3\/integrations\/google-analytics","name":"How to Add Google Analytics to Magento 2 AMP Pages - Plumrocket Documentation","isPartOf":{"@id":"https:\/\/plumrocket.com\/docs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/plumrocket.com\/docs\/magento-amp\/v3\/integrations\/google-analytics#primaryimage"},"datePublished":"2021-08-04T10:36:02+00:00","dateModified":"2023-05-18T12:16:46+00:00","author":{"@id":"https:\/\/plumrocket.com\/docs\/#\/schema\/person\/c96fccdb89342ae6804272265723eca8"},"description":"In this article, you will learn how to integrate Google Analytics into Magento 2 AMP Extension. Please follow the steps below to configure it correctly.","breadcrumb":{"@id":"https:\/\/plumrocket.com\/docs\/magento-amp\/v3\/integrations\/google-analytics#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/plumrocket.com\/docs\/magento-amp\/v3\/integrations\/google-analytics"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/plumrocket.com\/docs\/magento-amp\/v3\/integrations\/google-analytics#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Magento 2 Extensions","item":"https:\/\/plumrocket.com\/magento-extensions"},{"@type":"ListItem","position":2,"name":"Magento 2 AMP","item":"https:\/\/plumrocket.com\/magento-amp"},{"@type":"ListItem","position":3,"name":"Documentation","item":"https:\/\/plumrocket.com\/docs\/magento-amp"},{"@type":"ListItem","position":4,"name":"v3","item":"https:\/\/plumrocket.com\/docs\/magento-amp\/v3"},{"@type":"ListItem","position":5,"name":"Integrations","item":"https:\/\/plumrocket.com\/docs\/magento-amp\/v3\/integrations"},{"@type":"ListItem","position":6,"name":"How to Add Google Analytics to Magento 2 AMP Pages"}]},{"@type":"Person","@id":"https:\/\/plumrocket.com\/docs\/#\/schema\/person\/c96fccdb89342ae6804272265723eca8","name":"Plumrocket","image":{"@type":"ImageObject","@id":"https:\/\/plumrocket.com\/docs\/#personlogo","inLanguage":"en-US","url":"https:\/\/secure.gravatar.com\/avatar\/10c44aa45aab391250913d982e552e53?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/10c44aa45aab391250913d982e552e53?s=96&d=mm&r=g","caption":"Plumrocket"}}]}},"_links":{"self":[{"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/posts\/23180"}],"collection":[{"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/comments?post=23180"}],"version-history":[{"count":19,"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/posts\/23180\/revisions"}],"predecessor-version":[{"id":26505,"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/posts\/23180\/revisions\/26505"}],"wp:attachment":[{"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/media?parent=23180"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/categories?post=23180"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/tags?post=23180"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}