5 ms·
I once worked on a redesign for a site, and one of the sections I worked on was the "photo gallery" section. I had a beautiful JavaScript-based photo gallery wh
by codeka 14y ago
I once worked on a redesign for a site, and one of the sections I worked on was the "photo gallery" section. I had a beautiful JavaScript-based photo gallery which had nice transitions between photos, it was pretty slick and nice and fast. It even degraded to full page-loads if you didn't have JavaScript enabled.
In the end, I had to take out my beautiful JavaScript-based gallery and present the "degraded" experience all the time because after it went live, pageviews dropped "dramatically" and the ad people didn't like that.
In retrospect, I probably could've just refreshed the ads via JavaScript when I transitioned to a different photo, but the potential drop in ad revenue meant I was having to work quickly...
- stingraycharles 14y agoIn retrospect, I probably could've just refreshed the ads via JavaScript when I transitioned to a different photo Dynamically refreshing ads usually is not allowed with ad networks, since it can be abused to inflate adviews. For example, look at the AdSense policy: https://support.google.com/adsense/bin/answer.py?hl=en&answer=48182 https://support.google.com/adsense/bin/answer.py?hl=en&a... "Any method that artificially generates clicks or impressions on your Google ads is strictly prohibited. These prohibited methods include, but are not limited to, repeated manual clicks or impressions, automated click and impression generating tools and the use of robots or deceptive software. " Whether or not using javascript falls under the category of "impression generating tools" is probably open for discussion, but I wouldn't be surprised if Google didn't like this.
- alexchamberlain 14y agoWould it be acceptable to load a new segment of HTML, which includes an img tag and a new ad? You can prefetch the image.
- stingraycharles 14y agoI am in no way an expert in this area. All I know is that the TOSes of ad networks are usually vague but very strict in this area, because of fears of abuse. You should probably talk to your account manager to get an exception / clearance prior to releasing code that dynamically refreshes ads via javascript.
- anonymoushn 14y agoWhen I talked to ad networks about this, almost all of them would not let us use any method to refresh ads without the user generating a new pageview, even though our users would spend many hours on the same page.
- kd0amg 14y agoFWIW, GMail loads a new ad when I open an email.
- Animus7 14y agoThis is true and a good point. But obviously Google gets to call the shots with their own services. They only answer to their customers, who aren't whining about this.
- smackfu 14y agoYeah, I would think updating ads based on a user click is fine, whether that click is a full page reload or a javascript partial page refresh. But ad networks can be pretty capricious so who knows.
- dredmorbius 14y agoPhoto galleries / "Top N Xes for Y" stories which are nothing but link bait -- I lay tracks blasting away from that crap.