{"id":16271,"date":"2020-02-11T09:58:16","date_gmt":"2020-02-11T09:58:16","guid":{"rendered":"https:\/\/ampforwp.com\/tutorials\/?post_type=ht_kb&#038;p=16271"},"modified":"2020-02-12T10:27:08","modified_gmt":"2020-02-12T10:27:08","slug":"how-to-add-segment-analytics-in-amp","status":"publish","type":"ht_kb","link":"https:\/\/ampforwp.com\/tutorials\/article\/how-to-add-segment-analytics-in-amp\/","title":{"rendered":"How to add Segment Analytics in AMP"},"content":{"rendered":"\n<p><strong>In this tutorial, we will show you how to add Segment Analytics in AMP for this follow the below steps.<\/strong><\/p>\n\n\n\n<p><strong>Step 1 \u2013<\/strong>&nbsp;First go to the&nbsp;<strong>WordPress Dashboard<\/strong>&nbsp;-&gt;&nbsp;<strong>AMP option panel<\/strong>&nbsp;-&gt;&nbsp;<strong>Settings<\/strong>&nbsp;-&gt;&nbsp;<strong>Analytics<\/strong>.<\/p>\n\n\n\n<p><strong>Step 2 \u2013<\/strong>  <strong>Segment Analytics:&nbsp;<\/strong>Enable this option you need to enter the Segment Write Key.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"340\" src=\"https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2020\/02\/26-1024x340.png\" alt=\"\" class=\"wp-image-16276\" srcset=\"https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2020\/02\/26-1024x340.png 1024w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2020\/02\/26-300x100.png 300w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2020\/02\/26-768x255.png 768w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2020\/02\/26-50x17.png 50w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2020\/02\/26-60x20.png 60w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2020\/02\/26-100x33.png 100w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2020\/02\/26.png 1232w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p> <strong>Step 3 \u2013<\/strong>   First of all Signup\/login at <a href=\"https:\/\/segment.com\/\">Segment Analytics<\/a>. <\/p>\n\n\n\n<p><strong>Step 4 \u2013<\/strong> From here you can get the Segment Write Key in the Source, go to \u201c<strong>Settings<\/strong>&#8220;, and then go to \u201c<strong>API Keys<\/strong>\u201d like the below screenshot. <\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"439\" src=\"https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2020\/02\/25-1024x439.png\" alt=\"\" class=\"wp-image-16274\" srcset=\"https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2020\/02\/25-1024x439.png 1024w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2020\/02\/25-300x129.png 300w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2020\/02\/25-768x329.png 768w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2020\/02\/25-50x21.png 50w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2020\/02\/25-60x26.png 60w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2020\/02\/25-100x43.png 100w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2020\/02\/25.png 1225w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><strong>Step 5 \u2013 <\/strong>Copy this Segment Write Key and paste in this section. <\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"338\" src=\"https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2020\/02\/27-1024x338.png\" alt=\"\" class=\"wp-image-16278\" srcset=\"https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2020\/02\/27-1024x338.png 1024w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2020\/02\/27-300x99.png 300w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2020\/02\/27-768x254.png 768w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2020\/02\/27-50x17.png 50w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2020\/02\/27-60x20.png 60w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2020\/02\/27-100x33.png 100w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2020\/02\/27.png 1226w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><strong>Step 6 \u2013<\/strong> &nbsp;Click on the &#8220;<strong>Save Changes<\/strong>&#8221; button and it will be displayed on your AMP pages.<\/p>\n\n\n\n<p><strong>Step 7 \u2013 <\/strong>Once you have added then you can also check that in your source code of the AMP pages like this screenshot.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"157\" src=\"https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2020\/02\/Desktop-2020-02-11-15-48-50-1024x157.png\" alt=\"\" class=\"wp-image-16285\" srcset=\"https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2020\/02\/Desktop-2020-02-11-15-48-50-1024x157.png 1024w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2020\/02\/Desktop-2020-02-11-15-48-50-300x46.png 300w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2020\/02\/Desktop-2020-02-11-15-48-50-768x118.png 768w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2020\/02\/Desktop-2020-02-11-15-48-50-50x8.png 50w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2020\/02\/Desktop-2020-02-11-15-48-50-60x9.png 60w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2020\/02\/Desktop-2020-02-11-15-48-50-100x15.png 100w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2020\/02\/Desktop-2020-02-11-15-48-50.png 1365w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\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>In this tutorial, we will show you how to add Segment Analytics in AMP for this follow the below steps. Step 1 \u2013&nbsp;First go to the&nbsp;WordPress Dashboard&nbsp;-&gt;&nbsp;AMP option panel&nbsp;-&gt;&nbsp;Settings&nbsp;-&gt;&nbsp;Analytics. Step 2 \u2013 Segment Analytics:&nbsp;Enable this option you need to enter the Segment Write Key. Step 3 \u2013 First of all&#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\/16271"}],"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=16271"}],"version-history":[{"count":12,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb\/16271\/revisions"}],"predecessor-version":[{"id":16336,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb\/16271\/revisions\/16336"}],"wp:attachment":[{"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/media?parent=16271"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb-category?post=16271"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb-tag?post=16271"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}