• Resolved gautamkhurana003

    (@gautamkhurana003)


    Hi, I need some help regarding google analytical code in amp. As, js doesnt work in amp.
    I have tried to use amp related script so that analytical can start working. But, it is not working.

    Could you please type the accurate script for amp?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi @gautamkhurana003,

    Thanks for contacting us, to set up Google Analytics manually you can checkour guide. Or another quick way to use Google Analytics is using the plugin Sit Kit that will do the configuration for you.

    If you still need assistance you can share your UUID with us, and we can provide better feedback.

    Plugin Support Milind More

    (@milindmore22)

    Hello @gautamkhurana003

    Thank you for support topic, can you please share your AMP page URL so we can scripts you entered.

    You can use AMP plugin’ settings (AMP->Analytics) to enter google analytics code.

    When you enter type googleanalytics it will automatically generate sample code

    screenshot

    Code
    type : googleanalytics
    JSON config:

    {
    	"vars": {
    		"account": "UA-XXXXX-Y"
    	},
    	"triggers": {
    		"trackPageview": {
    			"on": "visible",
    			"request": "pageview"
    		}
    	}
    }

    You can alternatively try Site kit by Google plugin which links to services like analytics, search console, adsense etc. that works on both AMP and non-AMP pages

    Hope this helps!

    Thread Starter gautamkhurana003

    (@gautamkhurana003)

    Thanks milind👍, your code worked right and now i can continue using amp. Also thanks to fellyph👍.

    Guys, can you convert this javascript into json

    Script- <script id=”optinly_script” async=”true” data-app_id=’918371ab-e0d0-451e-b434-4b34343e1ff0′ src=’https://cdn.optinly.net/v1/optinly.js&#8217; type=’text/javascript’> </script>

    Plugin Support Milind More

    (@milindmore22)

    Hello @gautamkhurana003

    Unfortunately, Optinly is not AMP compatible or is AMP analytics vendor, it will best to approach Optinly support on how you can integrate optinly with AMP.

    Plugin Support Milind More

    (@milindmore22)

    @gautamkhurana003 As we didn’t receive a response I’ll mark this as resolved. Feel free to open a new support topic if you require any further assistance.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Related Amp-Analytics’ is closed to new replies.