Hi!
I am wondering about javascriptcalls to be able to track flash-clicks and AJAX-clicks that the user makes. Is it possible to have that faked, like you do in google-analytics? Would very much like to avoid using both google and only concentrate on implementing everything with w3counter..
Also, during development. Is it possible to try implementing everything with localhost or do I need to setup my domain to have it fully functionable?
regards,
/Henrik
Just to clarify what I am after:
Almost all of my calls are AJAX-calls. For example, some code:
<a href="userRegister.aspx" >Register</a>
The js-function getUserRegister is then an ajax-call to the page useRegister.aspx which will give me the xhtml-code to be presented in a special div. I would then like to fake that an actual call has been made to userRegister.aspx by calling a js-function that triggers w3counter so that it would look like userRegister has been clicked the traditional way.
Hope I'm making myself somewhat clear![]()
The same goes for flash. Since i wish to do the same here to be able to track what and where a user has clicked in a flashmovie that I make.
Is this possible?
regards,
/Henrik
damn... the onclick-call seems have been edited out.. strange. In the a-tag there is then a call to a javascriptfunction on onclick with return false to abort the href-call that would be made if the user doesn't have javascript on.
/Henrik
Hi Henrik,
I understand your question. I have not published any specific guidelines for passing in clicks like this, but I suppose you could do so by loading the tracker script that displays the counter/tracker image.
http://www.w3counter.com/tracker.js
Take a look at the w3counter() function that displays the image on your website and you'll see that it just writes an image tag requesting tracker.php and appending all the page info as GET parameters. You could construct a list of parameters, including the page URL you want to record (url=), and that request would result in a logged hit.
Two potential problems that you may be able to avoid, but I have not tested myself:
1. The referrer of the request should be the actual visitor if you want their data recorded, as the IP address of the requester is used for location info.
2. The referrer the web server recorded for the hit to tracker.php is checked for the GET variable "url". Only if the referrer is blank is the URL used. I might be able to switch this around after I consider possible side-effects.
Let me know if this answers your question and if it makes possible what you're doing. I have not examined how Google Analytics lets you send in click data this way to know if it's easier.
- Dan Grossman @ W3Counter
Sending ...