In this tutorial, we will show you how to add Segment Analytics in AMP for this follow the below steps.
Step 1 – First go to the WordPress Dashboard -> AMP option panel -> Settings -> Analytics.
Step 2 – Segment Analytics: Enable this option you need to enter the Segment Write Key.

Step 3 – First of all Signup/login at Segment Analytics.
Step 4 – From here you can get the Segment Write Key in the Source, go to “Settings“, and then go to “API Keys” like the below screenshot.

Step 5 – Copy this Segment Write Key and paste in this section.

Step 6 – Click on the “Save Changes” button and it will be displayed on your AMP pages.
Step 7 – Once you have added then you can also check that in your source code of the AMP pages like this screenshot.

That’s it for this tutorial!
We hope it helped you. If you have any feedback or questions, then please share them in the comments section below.