YOU CAN EDIT THIS PAGE! Just click any blue "Edit" link and start writing!

Tech:Disable AdWords for logged-in users

From Wikitravel Shared
Jump to: navigation, search

AdWords now chew up a fairly significant chunk of screen real-estate, which is a bit annoying for us hardcore Wikitravel junkies. It would be a nice perk to have them disabled for logged-in users, the same way that WikiHow does. Jpatokal 10:37, 2 April 2008 (EDT)

Agreed, especially as that would 1) encourage users to register, and 2) assuage discontent about the ads. It would also be nice to have a "toggle ads" option in Special:Preferences—I use a wide screen and don't mind the ads myself. --Peter Talk 11:13, 2 April 2008 (EDT)
Agreed. I don't have a principled objection to ads, I just don't want to look at them while volunteering my time. Padraic 15:57, 2 April 2008 (EDT)
I agree too, of course. -- Sergey kudryavtsev 16:31, 2 April 2008 (EDT)
This is a good suggestion. I've spoken with our tech team and we think we'll be able to provide this option to signed in users. It may take us a little while (days or a couple weeks) to figure out, but we are supportive of this. Redondo 16:52, 2 April 2008 (EDT)
yay – cacahuate talk 23:32, 3 April 2008 (EDT)
Opt-out is now available for signed-in users! The option is in Preferences, under the last tab on the right, "Wikitravel". JuCo 18:47, 22 April 2008 (EDT)
Check box appeared in user's preferences, but it is not function... :-(( -- Sergey kudryavtsev 16:35, 24 April 2008 (EDT)
Like pretty much all code changes, this involves some alterations to the html document. Which means it won't be picked up until the page updates in the cache. I'm slowly going through a purge cycle, but you can manually purge specific pages if they are bugging you. If the option still isn't working after you've purged a page, please let us know. KevinSours 17:40, 24 April 2008 (EDT)
Yesterday it seems functional. But 2-3 days ago when i was turn off advertising, it's not disappeared even after a page purging (by special link clicking while page editing). Anyway thanks, now it's work, i close this feature request. Also i will make a message at Russian Wikitravel about this ability to notify our users. :-)) -- Sergey kudryavtsev 02:50, 25 April 2008 (EDT)
I was hurry with my conclusions. At ru:Wikitravel:Пивная путешественников (a Russian Travellers' pub) advertising appered still, even after i click purging link. You may contact with our administrator ru:User:Peterfitzgerald for more operational work, because i am from UTC+3 time zone. -- Sergey kudryavtsev 03:07, 25 April 2008 (EDT)

(Unindenting because its getting a little extreme). I'm not able to reproduce. I logged into the Russian site and set my account there to not display ads. I did not see any ads at the url that you posted. Some potential thoughts:

  • The account config is handled for each language version. If you turn off ads on shared they aren't automatically turned off for Russian.
  • The ad logic is currently a javascript function. If you don't have js enabled then it won't work (and a lot of things won't work either). If there is a javascript error then it is possible that hide code isn't running for you. Can you report your browser type and version? Can you verify if there are errors (in IE there is a little icon in the lower left corner indicating an error and in firefox you can view tools > error console)
  • The process works by hiding the ads just after they render in the html. Its possible that if the javascript is running slow, they'll initially show and the disappear. Unlikely since I don't even see a flash on mine, but you never know. 16:56, 25 April 2008 (EDT)

One other possibility: sometimes its necessary to refresh your browser window after purging the cache. The disable-ads option is working properly for me on :ru. --Peter Talk 16:59, 25 April 2008 (EDT)
I went ahead and purged all of ru. Its small enough that I can get away with that (I do that to en and the box crawls for a while). That should eliminate one point of confusion. 17:48, 25 April 2008 (EDT)

The problem stil exists for me. I upload two screenshots to my personal site (replace @ to a dot, a spam filter prohibited):

NB: I use a IE 6.0 -- Sergey kudryavtsev 13:34, 26 April 2008 (EDT)

NB2: Java script is enabled, no js errors, advertising showing permanently. -- Sergey kudryavtsev 13:42, 26 April 2008 (EDT)

Same situation on shared and English Wikitravel:

-- Sergey kudryavtsev 13:57, 26 April 2008 (EDT)

I have a some programming skills, can i help you to find a bug in java script? -- Sergey kudryavtsev 14:02, 26 April 2008 (EDT)

I'm certainly not going to object -- especially since this appears to be limited to your own unique setup. The first thing to check is that you have the right cookie. This shoud be set when you log in (or save preferences with the ads hidden) and unset when you log out. The name of the cookie is wikitravel_org_-_ruHideAds and the value is "1". The actual js logic isn't that complicated, but the key functions to look at are:

read_cookie (gets the cookie value from the cookie string) handleAds (contains the logic to hide the ad column) 11:29, 28 April 2008 (EDT)

No, my cookie not contains "HideAds" at all. It is possible that i set this check box at work PC, but at home PC cookie is not altered. This is not right to store settings in server DB, but read this settings from cookie... You must read anyone setting from server DB, what you store on server. -- Sergey kudryavtsev 15:32, 28 April 2008 (EDT)
When i log out and log in ru Wikitravel, my cookie altered (HideAds=1 now) and advertising disappear. -- Sergey kudryavtsev 15:41, 28 April 2008 (EDT)
That makes sense. I hadn't considered the case were the setting is changed while a user is logged in from multiple computers. Using cookies like this is necessary because of the caching strategy. We serve the same html for each user, logged in or not, and handle customizations in javascript. While the setting is stored in the DB, a page served from cache doesn't access the DB (by design)so we need another way to track it. KevinSours 16:26, 28 April 2008 (EDT)
It's strange for me that a page is cached with advertising bar... In any case advertising content is dynamic by nature. This issue is minor surely, but in which way you intend to fix such problem? Altered a cookie when i save my settings (i suspect that it not altered)? It is possible good to make for users a warning that this setting store in cookie and about a potential need to log out/log in...
Yes and no. The ads are dynamic, but the html that delivers them is always the same. The actual content delivery is done in javascript (which is the standard way of handling ads). You can pull up view source on the page and see how it is done. We set the cookie when you log in or set the flag (and clear it when you log out or unset the flag), however that only affects the current machine/browser. This should be a relatively short term problem as most people aren't going to be changing the setting that often (most people aren't likely to be logged in from two places at once I don't think). If it turns out to affect a significant number of users, I'll try and figure out some better solutions. 11:30, 29 April 2008 (EDT)