Forum Moderators: martinibuster
I have seen posts that wish detailed AdSense reports such as site level or page level stats.
Currently, we are working on a script to track AdSense impressions and clicks. The script lets you track the stats of sites, pages, referrers, color combinations, ad formats, visitor countries, paid or alternate ads displayed etc.
To remove questions, it conforms to Google TOC completely. No change to AdSense code, no interference.
I want to know your opinions on tracking AdSense independently. Do you personally want to use such a script? What features would you expect?
Thanks
we are working on a script to track AdSense impressions and clicks
So you can write a script to track impressions and clicks that are logged on a server (googlesyndication.com) where you have no access to?... Very impressing.
... and you do that without witchcraft or any magical powers?
Welcome to Webmasterworld, monolitik!
So you can write a script to track impressions and clicks that are logged on a server (googlesyndication.com) where you have no access to?... Very impressing.... and you do that without witchcraft or any magical powers?
What we are doing is to track the impressions and clicks by placing a javascript code to the page having an adsense code. The tracking code reports the activity to a script installed on your server. Hope it makes sense now.
What we are doing is to track the impressions and clicks by placing a javascript code to the page having an adsense code. The tracking code reports the activity to a script installed on your server. Hope it makes sense now.
I'm no javascript expert, so forgive me if this sounds like a stupid question, but would that not involve trapping the AdSense click and then regenerating it?
TJ
I'm no javascript expert, so forgive me if this sounds like a stupid question, but would that not involve trapping the AdSense click and then regenerating it?
We developed an heuristic algorithm to guess the click indirectly, which involves analysis of some other events the visitor generated before leaving the document. Surely you have rigth to monitor the events on your page without interfering with Google code.
Realy? Well, after i read this thread, i wrote a javascript that actually TRACKS CLICKS on adsense ads (no altering or regenerating of clicks. Just a second function that gets invoked for the same click event). Took me 15 minutes. Don't know if it complies with the AdSense TOS though. But it's just a javascript one liner. I think, i'm going to give it a test run for a few days.
>heuristic algorithm to guess the click indirectly, which involves analysis of some other events
C'mon - honestly, that sounds cool but it's pretty useless.
[edited by: Yidaki at 1:32 pm (utc) on Feb. 25, 2004]
We developed an heuristic algorithm to guess the click indirectly, which involves analysis of some other events the visitor generated before leaving the document.
Tracking impressions is straigtforward. I am curious how you attempt to guess 1. whether an ad is clicked, 2. which ad position is clicked and 3. what the destination URL of that ad is and does so without violating the AdSense TOS. With a pretty major assumption about user behavior I can think of a way to use the onMouseover event to estimate #1 and #2, but not #3.
Yidaki:
Realy? Well, after i read this thread, i wrote a javascript that actually TRACKS CLICKS on adsense ads (no altering or regenerating of clicks. Just a second function that gets invoked for the same click event). Took me 15 minutes. Don't know if it complies with the AdSense TOS though. But it's just a javascript one liner. I think, i'm going to give it a test run for a few days.
richmondsteve:
Tracking impressions is straigtforward. I am curious how you attempt to guess 1. whether an ad is clicked, 2. which ad position is clicked and 3. what the destination URL of that ad is and does so without violating the AdSense TOS. With a pretty major assumption about user behavior I can think of a way to use the onMouseover event to estimate #1 and #2, but not #3
Please. I did not opened this topic to discuss technical issues. I just want to learn what AdSense publishers think tracking AdSense by their own and thus having much detail Google does not provide.
[webmasterworld.com...]
I tend to agree.
However, i see it as a great way for publishers to controll / observe fraud themself. Imagine this nifty little script combined with a blocking mechanism that either blocks clients completely or just suppresses AdSense display for clients that show suspicous click activity ... pretty easy to set up and very efficient.
May be AdSenseAdvisor would like to comment?
...... or just suppresses AdSense display for clients that show suspicous click activity
I like the idea in principle, but isn't a bit like locking the barn door after the horse has bolted?
To detect "suspicious" clicking, you need to let it happen. By then there is the risk that Google have already clocked it and the warning email (or worse) is under way.
I suppose if you could detect the activity early enough, you could block it from continuing though. I guess 4 suspicious clicks is better than 10.....
I think we need the word on TOS compliance/Googles view from ASA here.
TJ
>I think we need the word on TOS compliance/Googles view from ASA here.
Absolutely!
[edited by: Yidaki at 3:24 pm (utc) on Feb. 25, 2004]
Google has stated that they will offer domain level tracking.
While page level data is obviously preferable to domain level, I am willing to wait on Google. I find their foot dragging awful and many of their rules capricious, but the person who pays the piper gets to call the tune.
I'd love to have this kind of page level tracking. It helps me, I then help google and the AdWords advertisers make money.
None of us is going to try something like this at risk of getting kicked from the program, so it's the authority answer that we await......
TJ
I want to know your opinions on tracking AdSense independently. Do you personally want to use such a script? What features would you expect?
Of course I'd like to track Adsense independently. Of course there is the issue that Google won't like it. Correction - they'll go ballistic back at the plex and we'll get a new, improved and better cleaning TOS within a few days (not another one!).
Out of curiousity I'd like to know who's getting my traffic and be able to track who I'm sending how many visitors to. It can't be in Google's interest for me to know that of course as I may be generating enough traffic for advertiser X to approach them directly and try to cut Google out of the loop.
[edited by: Macro at 3:38 pm (utc) on Feb. 25, 2004]
which G might interpret as 'interfering' with the click-thru process.
I know what you're saying, but I cannot see that interpretation. "Interfering" I take, in the context of that clause in the TOS, as meaning "obstructing" or sending someone off somewhere else, or in an iFrame etc.
It's about tracking, and on that the TOS is silent. At the moment anyway (Macro's post refers).
TJ
May be AdSenseAdvisor would like to comment?
I'm sorry not to have responded sooner - I haven't had the time that I would like to have for posting :)
In regards to your questions: I don't know much about scripts such as these, so I can't comment on any of them in particular. But if you're not modifying the code, or trapping the clicks or changing the way ads are processed, it should be all right to implement a click-counter script like the ones suggested.
Do be careful not to change the ad code without realizing it, though.
ASA.
In the prior code I wrote, there was a function called log that got excuted everytime a iFrame receives focus. For testing, I just had it do a JavaScript alert, but you could easily call a webbug.
A webbug is a script excuted by a HTML tag (usually img). The script can be any type including PHP, PERL, ColdFusion, VB, etc.
I predomiantely code in PHP, so here's how it would look.
In the main document there is a JavaScipt function
function log() {
bug = new Image();
aURL='/pix.php?title=' + document.title;
bug.src = aURL;
}
Now everytime the log function gets executed it will cause a webserver hit to pix.php with the page's title as a parameter.
pix.php is then a php script that logs the action to a database or writes it to a flat file:
<?
if(!empty($_GET['title'])) $title=$_GET['title']; else $title='NA';
$ip=getenv(REMOTE_ADDR);
$sql="INSERT INTO log SET title=\"$title\",ip=\"$ip\"";
$result=mysql_query($sql);
?>
Obviously, it's helpful if the Database table log has an automatic timestamp column.
The script tracks events that happen in an iframe on the page (clicks in this case). You can expand the script to track the clicks using a web bug - like figment88 described.
BUT THIS DOESN'T WORK WITH ADSENSE
Uhm, why? Erm, i stand corrected what monolitik said. My appologize to you, monolitik - i should have known it since i had exactly the same problem with an app i wrote a few months ago ... oh well. Call me ignorant. ;)
The script runs pretty well with iframes that reside on the same server/domain where the page is located. BUT for security reasons, its NOT possible to access content or events of an iframe if the iframe content is loaded from a different domain (in this case google).
Again, sorry, monolitik and others for the confusion i brought.
The script simply won't work with AdSense - nor does figment88's script since it also uses the event handler.
I'm not a coding pro, but I think I have it right in that the "page" lies within an iFrame on someone elses domain and you cannot therefore track what happens there.
I guess this makes sense, otherwise everyone would be intercepting clicks to banks and "buy now" links...
Does that mean some kind of AdSense tracking tool is impossible?
Oh and going back to Monolitik's original post. Can we see the code, or see your script in action?
TJ
Of course you can't track events within an external iFrame. However the iFrame container is not external. The code that invokes the iFrame resides in the local document and you can track container events (e.g. when it receives focus).
Yidaki why don't you try my script, then tell me it doesn't work. I am more than happy to be coreected.
Thanks a million!
I rather suspect that Monalitik is doing something similar, but with a little more guesswork, possibly the position that the mouse was in when it entered the google iFrame, then taking a guess as to where the user was heading before the click?
TJ