Site logo

Archived topic

AdSense code not found

7 replies · Started by Klaudia on September 8, 2021

Viewing posts 1–8 of 8

I've added adsense code using hook, same as analytics. However google is not able to find it on my site. Please advise

Hi there,

can you share a link to your site so i can take a look.

Shared

Are you not seeing any adverts loading?
I am seeing lots of adverts loading on your site, within the post content, sidebar and footer etc.

That's Ezoic ads. Google is not finding the code, I'm trying to sign up for adsense.

It may be Google just taking its time to find and register the code, it doesn't happen immediately can take 24-48hrs to show up.
Or it may be Ezoic, as they do a lot of script reconfigurations on your site, you may want to check with Ezoic to see if they have any guidance.

If the info is of any help - Ezoic "takes over the DNS" from what I could gather - acting as a(n extra) proxy.
Their info on that:
https://support.ezoic.com/kb/article/how-does-ezoics-name-server-integration-work

Could that be "confusing" Google? Are they filtering?

This code has worked for me to configure Google auto ads using a GeneratePress child theme:

// BEGIN Google Auto Ads

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

add_action( 'wp_head', 'ns_google_autoads', 10 );

// END Google Auto Ads

I wasn't too happy with the auto-ads (too many ads), but this code did get them working. :)

Now I just use custom html via widgets, and add code to the header and use hooks - it works fine (Cloudflare proxy, but no Ezoic in my case).

Page right-click, then "View Page Source" can show the code. You can then search (CTRL + F) to see if there's your Google ads tag ID within the code shown to your browser (and other visitors).

Thanks for sharing!

This archived topic is closed to new replies.