Join the Soledad Facebook Users Group here
for Share, assistance, discussion, and Updates related to Soledad WordPress Theme.

If you can't create a new ticket - you can send us an email via our contact form and we will get back to you.

Okay
  Public Ticket #1579073
Adsense codes
Closed

Comments

  • Empirebridal started the conversation

    Hello, I want to now add Google Adsense codes to my site.  Do I need to add them to the normal Customiser section AND the Penci AMP section?  Or do I only do the Penci AMP section? Thank you Michelle

  •  2,699
    PenciDesign replied

    Hi,

    Yeah, you need put for both.

    The Appearance > Customizer section for all the pages is not AMP version.

    The Appearance > Customizer AMP section for all the AMP pages.

    For ads on AMP, please check the note here


    Best Regards,

    PenciDesign

  • Empirebridal replied

    Ok thank you.

    With header style 3 - I have placed the code in the section provided.  Is there a section for the same spot in the AMP version?

  •  2,699
    PenciDesign replied

    Hi,

    Let's check options for ads on AMP via Appearance > Customizer AMP ( NOT "Customize" )

    It's 2 different interfaces - so, of course it has different ads spaces.

    Best Regards,

    PenciDesign

  • Empirebridal replied

    Got it! Thanks

  • Empirebridal replied

    Sorry...in your instructions for changing Adwords code for AMP it says to use the 'data-ad-client' and -data-ad-slot' but the code given to me by Adwords, only has the 'data-ad-client' - I have not been given a 'data-ad-slot' number.

    It only gives me this:

     google_ad_client: "ca-pub-3385377484402476",
        enable_page_level_ads: true


  •  2,699
    PenciDesign replied

    Hi,

    No problemsYou just need use the code like google guide. Let's use the code like this:

    <amp-auto-ads type="adsense" data-ad-client="ca-pub-5439573510495356">
    </amp-auto-ads>
    


    Best Regards,

    PenciDesign

  • Empirebridal replied

    Also the code that Adsense now provides has google_ad_client NOT data-ad-client (see Below)

    <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
    <script>
      (adsbygoogle = window.adsbygoogle || []).push({
        google_ad_client: "ca-pub-3385377484402476",
        enable_page_level_ads: true
      });
    </script>

    Will the words need to match the AMP so it reads google ad client and not data ad client?

  •  2,699
    PenciDesign replied

    Hi,

    Yes, It's the same.

    You should check guide for it here

    And put the auto AMP ads codes via Appearance > Customizer AMP > Header Options > Add Custom Codes After <body> Tag

    Best Regards,

    PenciDesign

  • Empirebridal replied

    Sorry another question.  Can you use the Custom HTML widget to place ads in sidebars?

  •  2,699
    PenciDesign replied

    Hi,

    Yeah, you can - but this apply for the pages is not on AMP.


    Best Regards,

    PenciDesign

  • Empirebridal replied

    Hello...i put in the adsense codes in the amp section as per your instructions.  and I have had Google search come back with the following errors...i've attached a screen shot - How do i fix this?


  •  2,699
    PenciDesign replied

    Hi,

    As I can see, you're using google adsense auto ads on AMP. And you need to do following the guide here:

    https://www.ampproject.org/docs/reference/components/amp-auto-ads


    1/ Add more this code to Appearance > Customizer AMP > Header Options > Add Custom Code Inside <head> tag

    <script async="" custom-element="amp-auto-ads" src="https://cdn.ampproject.org/v0/amp-auto-ads-0.1.js"></script>
    

    2/ Use this code for google adsense auto ads on AMP by put this code to Appearance > Customizer AMP > Header Options > Add Custom Code After <body> Tag

    <amp-auto-ads type="adsense" data-ad-client="ca-pub-5439573510495356">
    </amp-auto-ads>
    

    Note Important: Replace ca-pub-5439573510495356  on the above code to your adsense data-ad-client


    Best Regards,

    PenciDesign

  • Empirebridal replied

    Just a question.  Do I have to use AMP?

  •  2,699
    PenciDesign replied

    Hi,

    You don't need for use AMP


    Best Regards,

    PenciDesign