• I’ve been trying to get my site to work with google AdSense’s Auto Ad feature.

    According to their documentation, I should add some code which they have provided to me with the <head></head> tags of my website. I’ve tried doing this within theme file editor > theme header as well as theme file editor > main index template but AdSense still doesn’t recognise that I’ve added the code.

    Where are the sites appropriate <head></head> tags located? Do I need to access my site via an FTP client to complete this operation?

    • This topic was modified 3 years, 6 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic

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

Viewing 1 replies (of 1 total)
  • I see the AdSense code in your site’s <head> element already. See the screenshot below.

    If no ads are appearing on your site, that’s a different issue: and you may want to contact Google about that.

    Note that even if the ads start to appear now, editing your theme file directly (from the dashboard or FTP) is not a recommended approach. That’s because when you update your theme, you’ll lose all the changes you did (unless you’re using a child theme) and you’ll need to manually edit the theme again to insert the code.

    Not only is this cumbersome, but often you’ll forget to add the code again… until you realize your earnings have dropped to zero 😀

    The better approach would be to use a plugin to insert the AdSense code (and any other 3rd-party code you need inserted on your site). The plugin’s data are saved in the database and do not get deleted when the plugin or your theme are updated.

    Google have their own official Site Kit plugin for adding various Google products to your site, including AdSense, Analytics, Search Console, etc: https://wordpress.org/plugins/google-site-kit/

    But there are also generic plugins for injecting code into the head or footer of your site. These can be used for anything, include AdSense code, FB tracking pixel, site verification meta tags, custom CSS and JavaScript code, and sometimes even custom PHP code.

    Here’s a very basic, no-frills one that does the job.

    And here’s a more capable one that has every feature plus the kitchen sink ( these can insert code into all sorts of places on the site, rotate ads, and keep your coffee warm all day long 😀 ).

    Good luck!

Viewing 1 replies (of 1 total)

The topic ‘Google AdSense Auto Ads’ is closed to new replies.