• Resolved brunofuchs

    (@brunofuchs)


    Since the last optimization, one of the Plug ins that we use in the page is no longer compatible with AMP.

    This is Head, Footer and Post Injections. However I can’t remove it because I do use it for my regular non amp page. Here we have our Adsense and Analytics Code.

    This issue is affecting our income as Adsense ads not always desplay and I don’t see the page count in our analyticis.

    Did some could work this out?

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

Viewing 15 replies - 1 through 15 (of 15 total)
  • Hi @brunofuchs,

    Thanks for contacting us, I was analyzing your website, I saw that you have Site Kit installed, in this case, you don’t need to inject the analytics code with the head and footer injections plugin, the Site kit plugin will take care of it.

    About the ads, header, footer injections post has an option to add AMP-compatible code, could you share how you are adding the ads code for amp pages ?

    Thread Starter brunofuchs

    (@brunofuchs)

    Hi @fellyph ,

    Thanks for your response. I am trying to paste how we have the codes in the AMP section, but I am not able to do that. I would not like to upload it in a third party app just to get a link.

    In the Head Section we have the first part of the text. And then in the section Just after the body.

    If there’s another way to show the screenshot let me know.

    Thanks,

    BF

    Thread Starter brunofuchs

    (@brunofuchs)

    Please find a link to the screenshot.

    https://zorroxmundo.com/wp-content/uploads/2022/02/AMP-Code.jpg

    Hi @brunofuchs,

    I saw your screenshot. I think the first script tag is not needed to amp version:

    Based on the ads documentation you just need to second tag:

    Thread Starter brunofuchs

    (@brunofuchs)

    Hi @fellyph,

    We have it because this are Adsense instructions for AMP:
    Paso 1: Copie y pegue la secuencia de comandos entre las etiquetas <head> y </head> de su sitio web

    Inserte este código una sola vez entre las etiquetas head del código HTML de su sitio AMP. Esta secuencia de comandos cargará las bibliotecas de amp-auto-ads pertinente

    Paso 2: Copie y pegue el código de los anuncios automáticos AMP justo después de la etiqueta <body> en las páginas de su sitio web

    Copie y pegue este código justo después de la etiqueta <body> de las páginas de su sitio web en las que quiera mostrar anuncios. La colocación del código no refleja la posición del anuncio.

    It’s in Spanish because the system is configured in that way.

    Thanks,

    BF

    Hi @brunofuchs,

    No problem, I do understand Spanish; for example, the code for “Paso 1” is the two script tags from your screenshot or just one like mine?

    For AMP up just need to get the code for AMP, available on the button “AMP is on”:

    Because using AMP is only allowed to load script tags for AMP components, and the tag that you are using at the beginner looks like a tag for the non-AMP version when you click on “get code.”

    like the print below:

    Hi @brunofuchs,

    I didn’t use the plugin “Head, Footer and Post Injections”, if you can try just add the body content and remove the script tags because depends on how the plugin injects the content. The AMP plugin can identify is and add the scripts needed.

    Thread Starter brunofuchs

    (@brunofuchs)

    Hi @fellyph,

    I erased the information from the Plug In and I don’t get any more ads.

    Will continue to make some trials. According to your last message I just need to leave the after body code. Is it right?

    Thanks once again,

    BF

    Hi @brunofuchs,

    The expected behavior is the AMP plugin injects the script tag when you include the amp-auto-ads tag on the body with your id; I have tested the AMP pages, and the ads are being displayed for me:

    Thread Starter brunofuchs

    (@brunofuchs)

    Hi @fellyph,

    Thanks so much for checking. I still don’t see advertisment if I enter directly to an AMP page. If add the /amp at the end of a regular page I do get ads.

    This is very strange. Also, the plug in is not making any compatibility issue with AMP anymore. However, ADSENSE ads are not appearing.

    Appreciate your support,

    BF

    Thread Starter brunofuchs

    (@brunofuchs)

    Hi @fellyph,

    Not sure what’s going up, but still no reliability with the ADS.

    I tried searching inside the Inspect function, and won’t see any “ads?” when pulling data directly from an AMP page. If I transform a regular page to AMP by changing the address, I do see Ads.

    https://www.google.com/amp/s/zorroxmundo.com/para-disfrutar-brasil-consideraciones-antes-de-visitar/amp/

    Still unsure what’s going on.

    Thanks,

    BF

    Hi @brunofuchs,

    I’ve checked the website and ads are appearing, in both AMP and canonical URLs: https://recordit.co/1AqePw77Qn

    The ads code has already been placed via Site Kit, so there is no action required. If they’re looking to increase ad performance they may consider switching to transitional or standard mode, so they can compare performance better between AMP and non-AMP. Reader mode doesn’t include the full themes layout, sidebars, and widgets. A better experience, for users and for ad performance could be to migrate from legacy reader mode.

    Thread Starter brunofuchs

    (@brunofuchs)

    Hi @fellyph,

    Thanks so much for helping. I think I understand the situation more, it still an situation to solve.

    When one access directly the AMP page with only the AMP at the end. Advertisments appear (sometimes even a lot, but I can check that later).

    https://zorroxmundo.com/roma-la-dolce-vita-en-la-ciudad-eterna/amp/

    However, when searching for the address directly from google, I see that the page address totally changes:

    https://www.google.com/amp/s/zorroxmundo.com/roma-la-dolce-vita-en-la-ciudad-eterna/amp/

    I’m not sure why I get the /amp/s before… but it is when ads don’t appear. Is there a way to incude also Adsense in the new form? or to avoid geeting the address with google.com/amp/s?

    Thanks so much,

    BF

    Hi @brunofuchs,

    The cached content comes from the origin domain, so if there are ads or ad code on the origin domain, then the AMP cache version will be the same. AMP Cache URLs don’t need to be approved in AdSense, ads are eligible to be served as it’s tied to the origin domain.

    What can happen the AMP-cache version can stores a version from one week ago where the ads weren’t set right. I will check again this week to see if the ads appear again.

    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 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Problems with Header Script’ is closed to new replies.