I have a website based on wordpress. I want to implement a click tracking system on some of external links. Is there any method of doing so without using any external website or google analytic s. Can't i call some external php script to run when the link is clicked and keep incrementing a variable everytime. Please help . Thanks in advance
+2
A:
You can link to a script that tracks redirects and redirects the user.
<a href="./out.php?url=http://domain.com">outbound link</a>
UPDATE: Don't forget to redirect with the status 301 to preserve the PageRank value added to the linked site.
Jan Kuča
2010-07-05 21:24:56
thanks so much for your help. can u also suggest how in this external php script i keep updating the external variable?how do i use this global variable?
ayush
2010-07-05 21:30:13
You can store the number of redirects to each URL in a database (MySQL, SQLite, CSV file, …). You get the target URL from $_GET['url'].
Jan Kuča
2010-07-05 21:38:34