Archived topic
Using wp_head hook for Google Auto Ads
3 replies · Started by Earl on April 26, 2019
This code snippet, supplied by Google, doesn't seem to do anything when inserted as a wp_head hook.
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
(adsbygoogle = window.adsbygoogle || []).push({
google_ad_client: "ca-pub-0000000000000000",
enable_page_level_ads: true
});
</script>
Am I missing something? I'm a relative noob to both Wordpress and GeneratePress.
Thanks.
Hi there,
Where does Google ask you to add the script? In the <head> section? If so, wp_head is the correct place for it.
Let me know :)
OK. The script is in the correct spot. I think the issue is that Google has not yet completed the automated site inspection that is done before ads will be served. In other words, "not your problem" as far as I can tell now.
It can sometimes take a little bit. You should be able to contact them to confirm everything is set up correctly.