• Resolved d3tr1tus

    (@d3tr1tus)


    Hi,

    I have problem with tag manager from google to showing in AMP page. I need to use custom script which I have in gtag administration to include in my site. In non-amp version it’s working but in AMP not.

    How can I use external javascript for sending data to gtag?

    I tried amp-script but script is not loading when classes are loaded before the script.

    Thank you for your help.

    • This topic was modified 2 years, 3 months ago by d3tr1tus.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Milind More

    (@milindmore22)

    Hello @d3tr1tus

    Thank you for the support topic, Can you please share how you are adding gtag?

    JFI: You can always add gtag using the AMP plugin (screenshot)
    1) Goto Dashboard->AMP->Analytics
    2) Add “type” as gtag
    3) It will populate a JSON based configuration where you need to add your gtag id

    You can reconfigure the JSON by adding custom events triggers and other customizations, You can learn more about gtag customizations on Google Tag documentation

    I hope this helps!

    Thread Starter d3tr1tus

    (@d3tr1tus)

    Hello @milindmore22

    thank you for your response I tried add this also like you write but my problem is that I need to specify custom html code + javascript + css to shows cookie banner. I tried to add amp-script but the amp-script is not loaded when i have there classes which are loaded before the script is fired.

    Do you have solution also for this?

    Thank you

    Plugin Support Milind More

    (@milindmore22)

    Hello @d3tr1tus

    The amp-script component doesn’t support cookies and history API, it supports common Web APIs like Fetch, WebSockets, localStorage, sessionStorage, and Canvas.

    You can try using localStorage instead of cookies, here is an example of amp-script with localStorage

    Plugin Support Milind More

    (@milindmore22)

    @d3tr1tus As we didn’t receive a response I will mark this as resolved. Feel free to open a new support topic if you continue to encounter issues.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Google Tagmanager not showing cookies’ is closed to new replies.