Now that Jetpack have started charging everyone and their dog for services that used to be “free” in exchange for tracking our website data for decades, I’ve started using Google SiteKit instead. When you connect AdSense to SiteKit, there’s a convenient option to withhold ads from logged-in WordPress users, just the way I had setup my website previously with manual PHP code. The feature is a little hidden though, so I thought I’d take a note for my future self and anyone else who’s interested.
- in your WordPress admin backend, head over to SiteKit Settings and expand the drop-down icon next to the AdSense section
- find the small Edit option at the bottom of that section and click it
- now change the setting for logged-in users
We have a choice to exclude all logged in users, or only those who can write posts (meaning regular subscriber roles still see ads).
Another nice feature is that SiteKit can either place the ad code, or we can still opt to do this manually like I do. That way we have complete control where on your site ads appear (for example, I have mine setup so that ads are excluded from regular pages and only appear on blog posts).
Hope this helps!