473,385 Members | 1,342 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Tracking clicks with JS

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
May 28 '07 #1
4 1757
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!

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
May 28 '07 #2
On May 28, 11:17 am, Merlin <ngro...@fastmail.fmwrote:
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

May 28 '07 #3
Merlin said the following on 5/28/2007 11:17 AM:
Hi there,

I am wondering if it is possible to track a click on my webpage and
record the destination URL.
Yes.
There is no possibility to ad code into the <a href tags as I am
trying to track the clicks on google adsense banners.
You can add code to the links, you just can't hard code it.
Does anybody have an idea on how to do that?
Yes.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
May 28 '07 #4
On Mon, 28 May 2007 17:17:56 +0200, Merlin <ng*****@fastmail.fmwrote:
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

--
There are 10 kinds of people:
those who know binary, and the others ...
May 29 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Shanfeng Cheng | last post by:
I write a piece of code to tracking the number of clicks on a link each day. The link usu. gets about 3000-6000 clicks per day. I just store today's click count in a one-line text file, like, ...
2
by: David Frauzel | last post by:
I'm writing a rough draft of a suite of small Perl apps that will, combined, serve as a web site's user sign-up, login, management, and customized content engine. I'm having trouble with the...
4
by: Glenn Owens | last post by:
I have a DataGrid web control which I've dynamically populated with template columns to be used for bulk-editting. Generally, all of the columns are textbox and/or dropdownlist child controls. ...
1
by: Jimmy | last post by:
In the asp.net application I develop, we need to provide the marketing department with the ability to insert small JavaScript code snippets into predefined content areas on several pages. This code...
1
by: Jimmy | last post by:
In the web application I develop, we need to provide the marketing department with the ability to insert small JavaScript code snippets into predefined content areas on several pages. This code is...
3
by: brett | last post by:
Are there any ASP.NET (2.0) (AJAX) tools that allow you to track the number of cliks a particular link is getting? I'd like to sell ad space and trade links with other people but want a way to...
1
by: vbnewb | last post by:
Hey All, I am new to the forums. Have been reading a bit here on some very useful tips and tutorials here. I am familiar with the basics of Access (tables , queries, forms,) but am such a newb at...
3
by: Prince of Code | last post by:
Hey all, I am trying to track the links that are clicked on a particular web page. Like a typical senario will be: Track (Count) how many times the main links Home,Help,About,Login etc are...
1
by: robert.oschler | last post by:
What's a good way to send tracking information to my server when a FORM submission occurs? Right now I build a URL that goes to a server side script that records the information. Then I set an IMG...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.