Tracking clicks with JS

M

Merlin

Hi there,

I am wondering if it is possible to track a click on my webpage and
record the destination URL. There is no possibility to ad code into the
<a href tags as I am trying to track the clicks on google adsense banners.

Does anybody have an idea on how to do that? My JS skills are pretty
limited.

Thank you in advance,

Merlin
 
E

Evertjan.

Merlin wrote on 28 mei 2007 in comp.lang.javascript:
I am wondering if it is possible to track a click on my webpage and
record the destination URL. There is no possibility to ad code into
the <a href tags as I am trying to track the clicks on google adsense
banners.

Where would you want that information stored?
On the page that get lost after the click?

Why is it not possible to change the page,
if it is your page?

Does anybody have an idea on how to do that?

Yes. somebody has.
My JS skills are pretty limited.

So you have three options:

- Learn some Javascript.
- Hire a professional.
- Do not follow this quest.
- Use some sorcery, Merlin.

Three!
 
D

David L. Goldberg

Hi there,

I am wondering if it is possible to track a click on my webpage and
record the destination URL. There is no possibility to ad code into the
<a href tags as I am trying to track the clicks on google adsense banners.

Does anybody have an idea on how to do that? My JS skills are pretty
limited.

Thank you in advance,

Merlin

I suppose you might be able to build a system that would rebuild the
add bar? It might be able to reassign all the links in the google
adds to shoot to your site which would store the string and or url of
the advertisement (you can do this via scraping the dom right?) into
your database and then construct this link to the original google
url? Google would still get their click and you would get the stats.
I wonder if this breaks some of their terms of agreement? Can't you
just access this information through google anyway? I have never used
google ads though so have no idea. Not sure if this would work

-David
 
K

Kristin Bruun

Hi there,

I am wondering if it is possible to track a click on my webpage and
record the destination URL. There is no possibility to ad code into the
<a href tags as I am trying to track the clicks on google adsense
banners.

Does anybody have an idea on how to do that? My JS skills are pretty
limited.

Thank you in advance,

Merlin

How about _not_ using javascript, but server side technology instead? Most
sites use a url that says
http://my.site.dom/redirectpage/www.new.url/etc/etc

You could solve the problem by setting up one dedicated page, that
extracts the url you send your users to, from the url as shown.
This page's only tasks are to
- track clicks
- redirect your users to the destination url
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top