problem Include the script in

Posted in: Newspaper
Post count: 44

Hi, I try to include the code
<script async custom-element="amp-iframe"
src="https://cdn.ampproject.org/v0/amp-iframe-0.1.js"></script>

for activation amp iframe in header.php,
but in the amp version of the site it is not called.

if I analyze the source code, on the normal version, I see the inclusion, while on the amp version no.

is it correct to place it in the wp-content/themes/Newspaper-child/header.php page?

thank you

Post count: 20688

Hi,

That will not work, the AMP plugin has head tags of it’s own here
https://www.screencast.com/t/QXZLwav8sgqY
So in order to load that in AMP you would have to enter it there.

Thanks

Post count: 44

hello, I did as you advised, apparently everything is fine, but the statistics are not recorded … something does not work … could you help me?

Below I port as I put the code on the site in the amp area.
https://i.postimg.cc/bNJyjjLj/amp.jpg
I add: I inserted the cage in the head as the directions say and as you told me to do in the post above. here’s how I see the code now:
https://i.postimg.cc/ncJHCDHp/amp2.jpg

thank you

  • This reply was modified 7 years by ghostmi.
Post count: 44

I solved, only the code had to be put:

{
“vars”: {
“account”: “UA-xxxx-3”
},
“triggers”: {
“trackPageview”: {
“on”: “visible”,
“request”: “pageview”
}
}
}

  • This reply was modified 7 years by ghostmi.
Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newspaper’ is closed to new topics and replies.