[Support request] google-site-verification /google adsense verification

Home Forums Support [Support request] google-site-verification /google adsense verification

Home Forums Support google-site-verification /google adsense verification

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #281304
    imke

    Hello,
    I need some help:
    I don’t succeed in verifying the google-site and google adsense.
    I’m using a plugin for facebook/youtube/google+ – this works.
    But the identification for google doesn’t work.
    Google asked me to put the following into the head/html:
    <meta name=”google-site-verification” content=”…..number…..” />
    and
    <script async src=”//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”></script>
    <script>
    (adsbygoogle = window.adsbygoogle || []).push({
    google_ad_client: “…code-number…..”,
    enable_page_level_ads: true
    });
    </script>

    I wasn’t sure, so I had a look in the generatepress support.
    In GP-Hooks I added:

    <meta name=”google-site-verification” content=”….number….. />
    add_shortcode( ‘adsense’ , ‘my_adsense_shortcode’ );
    function my_adsense_shortcode()
    {
    ob_start();
    ?>
    <script async src=”//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”></script>
    <!– Ad code –>
    <ins class=”adsbygoogle”
    style=”display:block”
    data-ad-client: “….code-number….”
    data-ad-slot:”…number…”
    data-ad-format=”auto”></ins>
    <script>
    (adsbygoogle = window.adsbygoogle || []).push({});
    </script>
    <?php
    return ob_get_clean();
    }

    I activated php and saved the Hooks.
    Then I had a look in the html-background of the website and couldn’t find anything.
    And I assume google doesn’t find anything either.
    website: view-source:http://bairisch-diatonischer-jodelwahnsinn.de/

    What’s wrong?
    Thank you for helping!
    Imke

    #281339
    Leo
    Staff
    Customer Support

    Hi Imke,

    I would recommend giving Tom’s method a shot: https://generatepress.com/forums/topic/page-header-content-cannot-save/#post-221222

    Let me know if this helps.

    #281448
    Tom
    Lead Developer
    Lead Developer

    That adsense code needs to be added to your functions, not GP Hooks: https://docs.generatepress.com/article/adding-php/

    #281593
    imke

    Hello,

    thanks for helping.
    This is very complicated. There is no way just to go into html?
    The next problem is to insert the google tag manager, too.
    Could I manage this via ftp?

    Imke

    #281615
    Leo
    Staff
    Customer Support

    Have you tried the method Tom suggested? You should be able to simply copy and paste the code into Code Snippet (make sure it’s activated).
    https://docs.generatepress.com/article/adding-php/#code-snippets

    #281668
    Tom
    Lead Developer
    Lead Developer

    Inserting the google manager tag can be done using GP Hooks in the wp_head hook.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.