#Hydration Error on Google Adsense Setup

1 messages · Page 1 of 1 (latest)

chrome trench
#

Hello folks, I'm implementing Google AdSense on an remix website. It has a modes of displaying ads called auto ads. The setup instruction says to load the script tag. But because it rewrites some places of the <head> I got hydration issues in production, and because the way google adsense is setup is hard to debug on local (approved domains and all ...)

The ads show up intermittently, I think I narrowed down to fresh load without nothing cached. When the application had botted and the navigation started on the client side it works, but as my website is mostly 1st page visits, I need to find a way to make it work from the first load.

Anyone had to deal with this kind of problem before?

worldly jacinth
#

I'm also using auto-ads, and I'm struggling to get them to work as I would like, but I can explain what I have done, and maybe it can help you. First off, I am only using "Overlay Formats" and not using "In Page Ads". From my experience over the many years as an AdSense publisher I have never seen the in-page ads work properly.

To implement the auto-ads ad-code, I have created a custom-hook, that checks for the existence of the of window and then appends the script tag to the document.head. This works relatively well, for the first page load. There is an issue with side rail ads, that flash or disappear when scrolling with the mouse wheel, but it's not too bad and only effects desktop users. On mobile, vignette and anchor ads are working well.

My big issue is that the ads don't change on page-changes since Remix doesn't reload the page. This to me is a real big problem, as I get very few impressions, compared to the number of page views. I have tried to remove the script and re-append it when the page changes but, since the AdSense codes ads its own tags to the head, those remain and then start to compound, which is a problem, both in terms of performance and AdSense policies as it may be cause ads to layered on page (not sure, about this, but its not good).

chrome trench
#

@worldly jacinth Thanks for sharing your experience.I don't even know what I did but right now I'm not getting the hydration erros anymore.

I got the same problem with ads disappearing on desktop on mouse wheel.

What a good observation about ads not changing, I noticed a very hard drops of ad impression from the last version of the website, and was not able to pinpoint it and now I think hit the bullseye where might be the problem might be.

worldly jacinth
chrome trench
#

Yeah that came trought my mind too, going back to manual inserting the standard ad-units and disable it's optmization from auto ads or go to google ad manager. Gonna try to add reloadDocument to my <Link> to force a server side load to see if the ads impression improve.

worldly jacinth
#

I checked out your site, the ads are working like on my site. At least I know it's not me! I did notice that the auto-ads still appear in the your home page, on first load and on re-load. Did you exclude the url in your AdSense account in the excluded pages section?

#

You can check out my website at meteor.run. You shouldn't see any ads when you land on the home page but after if you return they will remain there.

chrome trench
#

You mean the index ("/") page? I think I let it on on purpose.

#

Just trying to milk the $

#

We got hit hard by google last month, traffic dropped like 50%

worldly jacinth
#

That's fine! What url is excluded?

chrome trench
#

Nothin excluded, all pages have ads , they are mainly a yellowpage like website.

worldly jacinth
chrome trench
#

You would recomending leaving some pages empty?

worldly jacinth
#

I usually don't show ads on my home-page. But that really depends on how traffic gets to your website. I imagine in your case most users should be landing on a page like www.helpsaude.com/fisioterapia in which case your are not really losing much revenue by not having ads on the home page, and it looks a little more professional. You definitely need to remove the ads from contact page and a login or logout page if you have those, and also 404 error pages. Showing ads on those pages can lead to AdSense policy violations.

chrome trench
#

Wow, did not know about the policy violations for contact/404, gonna do that right now.

#

Thanks

worldly jacinth
#

I don't think it is really a big issue, unless you run into a problem and users end up en-mass on your 404 page, like if your server goes down or something. But better safe than sorry!