| | #1 |
| HyperActive Warrior Join Date: 2010
Posts: 124
Thanks: 16
Thanked 4 Times in 3 Posts
|
hi is there any way i can count the clicks sent to an external link on my site? to see how much visitors i sent to that site . the link is a simple link with image . thank you very much |
| |
| | #2 |
| Long Time Warrior War Room Member Join Date: 2008 Location: United States
Posts: 582
Thanks: 15
Thanked 108 Times in 54 Posts
Blog Entries: 2 |
You can just look at your Google Analytics, it will tell you.
|
| P.S. If you found my post useful, please click the "Thanks" button below... | |
| |
| | #3 |
| JV Software Engineer War Room Member Join Date: 2007 Location: State College, PA, USA
Posts: 75
Thanks: 1
Thanked 12 Times in 11 Posts
|
If you need more in-house control, you can create a simple PHP script that redirects the link. You just link to the PHP script, the script logs the click where and how you want, and then redirects to the final URL destination. For example: <?php $count = intval(file_get_contents('/path/to/file')); $count++; file_put_contents('/path/to/file', $count); header('location: http://www.final-destination-here.com'); exit(); ?> Keep in mind that this will log everything....including spiders. Mike's suggestion will likely give you clicks by "real" people. |
| | |
| |
| The Following User Says Thank You to gcornelisse For This Useful Post: |
| | #4 |
| HyperActive Warrior Join Date: 2010
Posts: 124
Thanks: 16
Thanked 4 Times in 3 Posts
| |
| |
| | #5 |
| HyperActive Warrior Join Date: 2010
Posts: 124
Thanks: 16
Thanked 4 Times in 3 Posts
|
@ gcornelisse thanks for the code . but where will the logs be stored? where will i see how many clicks ?
|
| |
| | #6 |
| Long Time Warrior War Room Member Join Date: 2008 Location: United States
Posts: 582
Thanks: 15
Thanked 108 Times in 54 Posts
Blog Entries: 2 |
@downloadvyp I use the Ultimate Google Analytics plugin for WordPress and it has an option to track external links. If your site is in WordPress, you may want to give it a try.
|
| P.S. If you found my post useful, please click the "Thanks" button below... | |
| |
| | #7 | |
| HyperActive Warrior Join Date: 2010
Posts: 124
Thanks: 16
Thanked 4 Times in 3 Posts
|
my site is in joomla . so i can't use it. thanks anyway
| |
| |
| | #8 |
| HyperActive Warrior Join Date: 2010
Posts: 124
Thanks: 16
Thanked 4 Times in 3 Posts
|
nobody ? please
|
| |
| | #9 |
| Active Warrior War Room Member Join Date: 2009
Posts: 97
Thanks: 4
Thanked 14 Times in 14 Posts
|
google is your friend google.com/support/analytics/bin/answer.py?hl=en&answer=55527 |
| |
| | #10 |
| HyperActive Warrior Join Date: 2010 Location: KL, Malaysia
Posts: 104
Thanks: 20
Thanked 10 Times in 10 Posts
|
I am also looking a solution for this .. but i m using Wordpress.. i saw a few wordpress owner that use this features.. when we hover mouse to the link, it will says how many click for that link have been encountered.. Anyone may help us? |
| | |
| |
| | #11 |
| VIP Warrior War Room Member Join Date: 2008 Location: Montreal Canada
Posts: 2,390
Thanks: 1,017
Thanked 836 Times in 572 Posts
Blog Entries: 1 |
I think Gary gave you all the answer in post #3. You write a simple PHP script that essentially increments a counter and then redirects the user to the selected page. There are probably dozens or hundreds of ways to do this, he illustrated one of them. You could pipe the output to a text file that you could use as a log, or to a database table. You could also tag a timestamp and some additional information to each record. This could be done regardless of your platform, with WordPress or Joomla you could either write your own plugin/component or use one of the existing ones that let you run PHP code within your posts. You could also just upload a PHP file that you use to direct every link to along with a ($_GET) parameter containing the final link - that would be a generic solution that would work with any platform. Bill |
| |
|
| Bookmarks |
| Tags |
| clicks, count, external, link |
| |