Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Track Every Click during Shopping Visit

Posted on 2004-10-12
Medium Priority
Last Modified: 2006-11-17
My customer suspects someone is tampering with his ecommerce site
and wants to be able to track every click made to gather more information.
We know via WebTrends and other methods that there are lots of visitors
but not sales and all else looks good. I have placed countless test orders....

Soooo, I was thinking of maybe using onclick to trigger some type of data capture:

Is it possible to systematically update the site to include this kind of tracking?
(i.e. search-n-replace or something other than manual updates - lots of links!)

When you click, does onclick have access to the destination url?

Also, can onclick be used to issue a database write to a clicks table?

Question by:DougCoulter
LVL 30

Accepted Solution

third earned 750 total points
ID: 12294913
"When you click, does onclick have access to the destination url?"

yes. it is

<a href="theurl.html" onclick="alert(this.href);return false;">link</a>

"Also, can onclick be used to issue a database write to a clicks table?"

you can use a hidden iframe on your page and pass the destination url to that page then have that framed page process the passed url to your database.
LVL 21

Expert Comment

ID: 12295128
I suggest that you can add a function call in each page_load of the forms available. This method can be made to store the information of the request object like IP address, browser type. You can also capture each click (every postback rather) that way. And we can use the same method to store the info to the database for further processing and reference.

If you want to capture only the kind of people. You can add a method in the global.asax session_start method and capture one time information about the visitors. This way you cannot capture each click.

It would be better if you could provide what kind of information you want to capture. Is it something like everytime any click is made you want to capture the event.

Hope this helped.

Author Comment

ID: 12298833
We want to capture the URLs with a date/time stamp for each session.

That way, if we see the shoppers are disappearing at a certain page or scenario
we have clues about technical problems or orders being hijacked.

I do collect initial info using the global.asax session_start method, and we have
confirmed that the visitors are getting there, now we need to go deeper and
find out what happens once they arrive.

Ideally, for each session, a click-by-click description of that shopper.
Some pages have dozens of links, so we want to know not only that they visited
that page, but which link they clicked to go on.

I hope I am explaining this well - does that make sense?
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 21

Expert Comment

ID: 12304883
Are all the pages aspx pages? What i would like to know is, will all clicks lead to pages that will undergo server processing?
LVL 21

Expert Comment

ID: 12304897
Should all hyperlinks within the same website tracked or links that lead to other websites also?

Author Comment

ID: 12304960
The site is using classic ASP, not ASP.NET
We would like all links within this domain to be tracked
(if we can capture the url they exit with, that's a bonus)
LVL 25

Expert Comment

by:James Rodgers
ID: 13121354
No comment has been added to this question in more than 21 days, so it is now classified as abandoned..
I will leave the following recommendation for this question in the Cleanup topic area:

Accept : third {12294913}

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

EE Cleanup Volunteer

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my daily work (mainly using ASP.net), I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question