Click to See Complete Forum and Search --> : Need help tracking clicks
Gregmo
12-05-2007, 07:43 AM
Hi there,
I work for a blue chip company in their web services department. I'm disecting a javascript file and have hardly any clue as to how it works.
I want to ping a request to our adserver when an event happens to record the event. Therefore I need to include a function in an if statement to make this happen.
The code looks as follows:
if (command == 'act_ppo')
{
cvlayout.style.top = '-1000px';
unlayout.style.top = top;
}
I need to add something along the lines of
if (command == 'act_ppo')
{
cvlayout.style.top = '-1000px';
unlayout.style.top = top;
goto URL at this point without leaving page
}
Any ideas what I would need to put in there?
Thanks for your help in advance.
Gregmo
You might check and see if this helps (http://www.msblabs.org/tools/pinger.js).
Gregmo
12-05-2007, 10:04 AM
Thanks for replying.
Excuse me if I've been misleading. I don't actually have to perform a ping command. I need to send a request to a URL.
So effectively the user will visit a URL along the lines of http://adserver.ads.com/?15432546;redirect= without even knowing they've done so. In doing so this will record the event with our ad server.
So to clarify I need to visit a URL without leaving the page, opening windows or refreshing the page they are on.
Is this possible?
So let me see if I understand. You want to record a click on your ad server without it actually being clicked?
Gregmo
12-05-2007, 10:58 AM
Yes that's exactly it.
Am I barking up the wrong tree?
I would think so, especially if your ad company finds out. The payout is based on people actually clicking those ad links. I'm sure doing what you're suggesting is in violation of their contract (unless I am missing something). If people aren't clicking on the link, why should you get paid when you are the one actually doing the clicking?
Gregmo
12-05-2007, 12:50 PM
No we are not looking to manipulate a cost-per-click model. We are selling the ad. We are hosting the ad using a 3rd party. Our creative is a java-driven flash based ad that involves interaction on a mouseover. We are trying to capture data on how many people actually mouseover the ad. The code I posted was the fuction that happens on the mouseover.
I was going to use the ad servers click capturing facility to capture the interaction data.
Ahhh, that's why I said I must be misunderstanding something. You're not looking to click the link; rather, you're looking to track the clicks themselves.
Gregmo
12-05-2007, 01:23 PM
We are looking for 3 separate sets of data:
The impression count
The click count
The interaction count
I can get the impressions and clicks but not the interactions. So I was going to using a click counting URL to count the interactions also.
Gregmo
12-06-2007, 06:12 AM
I guess the title was misleading as it turns out that it isn't so straightforward after all.
Does anyone have any ideas as to how to solve this any other way?
I'm going to move this to the general forum (and change the title). You may bet better coverage there.
Gregmo
12-06-2007, 09:28 AM
i think I've cracked it
I modified the code to this:
// Click Command to track peelbacks
var peelrecord = "http://ad.adserverx.com/click;654841346;8616811256;x?#"
if (command == 'act_ppo')
{
cvlayout.style.top = '-1000px';
unlayout.style.top = top;
location.href=peelrecord;
}
It's not the ideal way but it seems to function how I wanted. Sending a http request everytime someone mouseovers could potentially cause grief. I guess a better way would be to use a counting pixel but I wouldn't know where to start to intergrate that!
Typhoon101
12-06-2007, 09:41 AM
If i understand your problem correctly, I think you need to look at AJAX. AJAX makes requests to a server in the background without reloading the page, launching new windows etc.
I don't know enough about AJAX to give you more specific advice, but google it. There are many very good tutorials on the subject. Essentially it is just javascript, so should be easy to follow as well.
Gregmo
12-06-2007, 09:44 AM
It would be easy if I was proficient in java, but unfortuanately I have next to no clue about it.
Thank you for your reply.