WP-Click-Track
wp-click-track is a WordPress plugin, started in January 2009, that adds automated link tracking to your posts and pages. It initially started out as a simple plugin for my own personal usage but has since evolved into a full module all its own.
Features
Usage
Future Releases
Change Log
Installation
Requires at least: 2.6
Tested up to: 2.9stable
Stable tag: 2.9
Tracks link clicks from hrefs in posts and pages.
Description
The click tracker works in 2 modes:
1. Scans posts and rewrites them to include a tracking element.
2. Enables users to create stand alone trackable links that can be embedded in posts or offsite.
Features
Automatically converts links in posts, pages and sidebar to allow for tracking.
Extensive reporting area:
- Link Report
- Daily Report
- Admin Widget
Usage
The click tracker works in 2 modes:
1. Scans posts and rewrites them to include a tracking element
2. Enables users to create stand alone trackable links that can be embedded in posts or offsite.
Links should include a title paramater in the href to have the reference name be automatically created. Ex:
<a href=”http://url.com” title=”Link Title”>link copy</a>
Links without a title attribute will have a default name created.
Future Releases
- advanced reporting
- localization
- export data
Changelog
0.7
- Modification: Improved tracking cookie management.
- Modification: Added setting to disable the tracking of internal (same URL) links
- Modification: Changed Configure page to use tab ui
- Bug fix: Fixed ssl (https) => flash issue
- Bug fix: Fixed sidebar.css 404 error
- Bug fix: Added “nowrap” to table template headers
- Bug fix: Fixed Day Pie chart for thousandths
0.6
- Modification: Added Top Clicks Sidebar Widget
- Modification: Added Todays Clicks Sidebar Widget
- Modification: Added Link Search (requires MyISAM table type)
- Modification: Began localization phase
- Modification: Improved admin interface and menu
- Modification: Improved tracking mechanism
- Bug fix: Fixed ‘label’ in Exclude IP field on configure page
- Bug fix: Fixed “self” link tracking/FireFox issue.
- Bug fix: Fixed “https” being ignored during sanity check.
0.5.1
- Modification: Added Miscellaneous Settings (Sarah Mod)
- Modification: Changed admin widget date range to match WordPress.com Stats widget
- Bug fix: Fixed ‘label’ in configure page form
0.5
- Modification: Added ignore IP address for click tracking
- Modification: Added link statistics reset
- Modification: Changed graphs to Open Flash Chart
- Modification: Added additional line chart vectors to display unique clicks
- Modification: Added link parsing of next and prev template tags
- Modification: Added link parsing of categories in posts/pages as well as sidebar widget
- Modification: Added link parsing of tags links template
- Modification: Improved title extraction to reduce No Name Given auto-label
- Modification: Added global history and report page
- Bug fix: Click graph date descrepancy issue
- Bug fix: Added bypass for external links being double tracked when entered in page
- Bug fix: Fixed backwards tracking flags
- Bug fix: Changed admin widget ordering to list most clicked to least click
0.4.2
- Modification: Admin widget links to click admin
0.4.1
- Improvement: Added admin widget
- Bug fix: Fixed “Division by zero” bus
0.4
- Improvement: Added configuration page
- Improvement: Added “Add Link” mod. Admins can create standalone links for placement on external sites.
- Improvement:Added “Edit Link” mod for editing names or stored links.
- Improvement:Enable or disable individual parsing sections
- Improvement:Enable or disable individual parsing sections
- Improvement:Moved google api js call to only fire on click track pages (was slowing down some areas of the admin).
- Bug fix: fixed spelling of days of week
- Bug fix:fixed pathing issue for tracking call (Logan and Gary’s Bug)
- Bug fix:fixed comment body parsing (wasn’t grabbing links)
- Bug fix:fixed memory issues (FINALLY
0.3
- Improvement: Added Indexes on tables for better performance
- Improvement: Updated Install system
- Improvement: Added pie charts for clicks by day and hour
- Bug fix: hour click report formatting
- Bug fix: blank link haunting
- Bug fix: option saving
0.2.1
- Bug fix: include usage of both quotes (“) and single-quotes (‘) for attributes
- added parsing / tracking of Archive links
- added parsing / tracking of Bookmark links
- added parsing / tracking of Comment Author URL links
- fixed option updates
0.2
- Add report area– List of referrers– Clicks by day– Clicks by hour– View individual clicks
- Manage Google Analytics WordPress Plugin incompatibility
- Add upgrade notification
0.1.1
- Bug fix js Image() issue
0.1
- Initial Release
Bugs
- admin panel doesn’t keep state
- Incompatibility with Google Analytics WordPress Plugin with Track Outbound enabled
Installation
- Create backup.
- Upload the zip file to the `/wp-content/plugins/` directory
- Unzip
- Activate the plugin through the ‘Plugins’ menu in WordPress
Please let me know any bugs, improvements, comments, suggestions.
Download Click Tracker



Email
Twitter
Hi !
I installed the plugin on my site.
But the links in posts are not counted, but the plugin is configured to count the posts-links.
Take a look at : http://specialpress.net/demo5/nachrichten/rene-adler-und-jerome-boateng-der-souveran-und-der-debutant/
There are a lot of links (like “FAZ.NET – Homepage”) wihtout the tracking code.
Any ideas ?
Regards
Ralf
Hi Ralf,
I just checked your site and the plugin appears to be working every except on the links you’ve specified. Are those links, by chance, not in the actual post content (body) but added through a plugin or similar?
Also, sorry for the delay; I had a family emergency.
Thanks,
Eric
Hello!
Great plugin! Once I start generating money and counting clicks I will donate!
ONE QUESTION:
how do I list what IPs click what URLs?
Jason
Hi Jason,
When you’re looking at a link, in the admin area, you can see the IP addresses with the total and unique click counts per IP address.
Eric
it’s possible use it outside from post (etc: themes template or widget) ?
Hi Abdul,
Definitely! There’s a stand alone link creator in the administration panel.
Eric
Plugin giving me an issue with proplayer video plugin and flexability theme. It works fine on another theme and with proplayer. I can’t understand why it is giving me this issue. I am hoping you can help me figure this out.
Thanks Eric
Robert
Hi Robert,
That is weird man; can you get me a link so I can take a look?
Thanks,
Eric
‘Ello,
If I understand this correctly I can set up my own tracking codes so that specific links are tracked rather than having the plugin add in it’s own tracking code. How do I go about doing this if this is possible?
I just worked this out, almost straight after posting the question even though I’d spent a good while before hand trying to figure it out.
Something that doesn’t seem to work though is automatically detecting links in my posts and replacing them.
Hi Neil,
Can you post a link to your site? I’m curious why the plugin isn’t parsing the links…
Thanks,
Eric
‘Ello,
I will try and get it online within the next hour as I’m developing the site currently on a local machine. Just thinking about that could developing on a local machine have an effect?
‘Ello,
I’ve put the link to the site online, or what has been developed so far. The link is below most of the links I’ve manually setup on there using your plugin, but it would be much better if this would pickup all the links automatically. There is a link I’ve just added in as a test in the centre of the page and under the title “Why choose M&S Insurance?” If you could help me it would be a great help
http://www.directinsurance.uk.com/wordpress/?page_id=3
Hi Neil,
I was a little confused about your issues man; the plugin does track links automatically. That’s what’s so cool about it
There is no reason to create special click tracked links for posts (and a crapload of other areas too) unless it’s going to be hosted offsite. No, it doesn’t replace links with a tracked link; the system uses JavaScript to handle that so the canonical relationship of the link to source are kept intact (something that the created links don’t do).
Check the HTML source on the “Test” link and you’ll see the onclick event in the href code. I clicked it and confirmed it is tracking; you can verify this in the admin panel of the plugin.
Take a look at the configure page to get an idea of what sections are automatically parsed for links; there’s quite a few areas.
Eric
‘Ello,
I just had a look and it’s working fine, although I tried what you just suggested when it was running on my local machine and it didn’t seem to register the clicks on my local machine, although now it does appear to be doing so. All I can think is I was doing something really weird and stupid and it didn’t work.
Thank you alot for the reply and helping me solve this non-problem.
No worries man; there’s always something when working locally then moving to the host
[...] WP-Click-Tracker [...]
‘Ello,
Been using this Click Tracker for a few days now and the people who manage the sites love it and this it’s great I like it even more as well because it’s so easy to setup.
The only extra feature that I think this could do with is being able to select a date range, so at the moment the reports page shows all the statistics for the current date but being able to select another date or range of dates would be good.
Other than that great work, you’ve helped a lot.
I had to disable the plug-in because my images wouldn’t display. Instead an href with the text onclick= was displayed instead. Any ideas?
Hello,
You have a great plug in here. I recently downloaded it and installed it on my blog ( wp 2.8.6). The problem i have is when i activate the plugin it somehows breaks the CSS of the theme. When i disable it the the blog is back to normal. Any ideas why it does that?
I wrote a “lite” version of this that uses javascript to rewrite the links (Outbound-Click-Tracker). If I had known about your plugin I might not have gone to the trouble. It seems very comprehensive.
Hi Keith,
Thanks man; I’ve been working on it steadily for the last year so I’m glad it’s appealing. I checked out your code and I like how you offloaded the link parsing to the client instead of how I’m doing it with filters and such. Might just have to “borrow” that technique
Don’t stop development on your plugin though. It’d be cool to have some competition to help drive the possibilities. Both plugins are open source after all.
Eric
Eric
I noticed a few comments back that you asked a poster whether their links had been created by a plugin.
Does the click tracker work with links created by reviewazon or phpbay?
Regards
clway
[...] but trust me, you will want the reports from this plugin. You can find out more information from WP Click Track’s description by the author. To install it on your site, go to the Install New Plugins portion in your WordPress administration [...]
[...] WP-Click-Tracker 0.7 (combien de clics et sur quelques liens) [...]
I get an error message on the ‘list all’ tab
Division by zero in …/plugins/wp-click-track/admin.inc.php on line 417
Any idea?
How do I get it to “scan” my sites and automatically add the tracking link. Also, is there a way to narrow it down so I can see the links clicked on certain pages or posts.
Any help will be great,
Mike
[...] Achei um cara muito interessante. O nome dele é: WP-Click-Tracker (http://blog.ericlamb.net/projects/wp-click-track). [...]
Hi there,
This is a great plug-in, but I was wondering whether there’s a way to configure it to present data based on the configured timezone of the WordPress installation?
Cheers,
Preston.
Hello just stumbled your site and i thank you for your article it was interesting. I am curious about doing link building for my site too. Have you used the scrapebox.com program? If so is it good? If not then what is the best tool? Thank you.
Hi Eric,
I installed your plugin yesterday. I left your default settings alone, and created 5 links for ads appearing in widgets and at the bottom of content. I am not getting anything in the reporting area. I do, however get information on “Top Referrers” and “Individual Clicks” by clicking on a link from the list of links and then scrolling down the page. It is great to get this by link ie., client but can I get these stats combined to provide a look at overall performance?
Thanks for putting out this great plugin, I am using it in combination with Datafeer Random Ads in hopes of being able to rotate my ads and count clicks and impressions. So far I am still lacking the ability to count impressions. Got anything on that front?
Thanks again,
Steve
Sorry about the second note. I left out that I have done the installation on my staging site which is password protected, if that would impact performance.
Hi!
I am using Exec-PHP plugin with my WP to include some php code in pages.
When I turn on WP-Click-Tracker, my page are starting to have error:
Parse error: syntax error, unexpected T_RETURN in ***/wp-content/plugins/exec-php/includes/runtime.php(42) : eval()’d code on line 3
When i turn WP-Click-Tracker off everything is going back to normal?
Is there a easy way to solve this?
Best regars,
Hyperion
Hi,
My site is clearingandsettlement.com I installed the plugin and it tracks links in the posts. I want every link on the homepage to be tracked including the navbar, images, and links to posts. I tried adding links Can you explain to me how to do this if it’s possible?
Thanks,
Tom
Hi,
This is a great plugin.
I will use to control my ads system.
But i have a problem here. I’m using timezone +9:00 in wordpress options, and in clicks report by hour is showing the timezone of server (in USA).
Is possible to change it to my timezone?
If you send a php code to me i can to do it.
Thanks and congratulation about this job!
Thanks for this plug-in . can you explain this plug-in works for tracking adsense clicks?
my friends account was disabled due to click fraud, due to i also want to track ips which are clicking ads. i dont want click fraud on my blog fm radio online
thanks in advance
sorry the this was fm radio online please check it and suggest any soloution
thanks
Hi, Eric.
I may have overlooked this but–does your plugin also track clicks on images that have links? We have a couple of linked images that we want to track stats for (number of clicks for each image,etc.) and it sounds like this would be the plugin to do that but I don’t see anything specifically about image links (or does that just fall under the bucket of “all href” instances in a page, post, or theme?).
Thanks!
-Efrem
Hi Efrem,
Yes, if the images and links are inside a post or page (this is crucial) then the links will be tracked. The plugin doesn’t discriminate
Eric
OK–here’s another one for you:
I went into my theme editor and added in some hard-coded links (so they show up in the same place on each page) but those links don’t seem to be getting tracked. Shouldn’t they be picked up as well? I created manual links for these in the “Add Link” section of the plugin settings.
The only links that get tracked are those inside of posts. Links that are inside of the theme aren’t parsed automatically.
You can manually add the tracking code to the links in the theme though (that’s what I do). Just add the below to the links you want to track; be sure to change the values in the snippet though.
–code–
onclick=”return TrackClick(‘CHANGE TO URL’,'CHANGE TO TITLE’)”
–/code–
Just add that to any link, inside the “a” tag and change the values to the URL and TITLE. I hope that isn’t too confusing.
Eric
The only links that get tracked are those inside of posts. Links that are inside of the theme aren’t parsed automatically.
You can manually add the tracking code to the links in the theme though (that’s what I do). Just add the below to the links you want to track; be sure to change the values in the snippet though.
–code–
onclick=”return TrackClick(‘CHANGE TO URL’,’CHANGE TO TITLE’)”
–/code–
Just add that to any link, inside the “a” tag and change the values to the URL and TITLE. I hope that isn’t too confusing.
Eric
Hi Eric, yes is too confusing for me, can you explain it again please? Thank you!
Ernest
Anybody know the best way to export the report data? I could probably get it directly from my database but it would be nice to have an “export” feature in the plugin that would dump the stats into a CSV or tab delimited file for use in a spreadsheet.
Any suggestions would be greatly appreciated.
Thanks!
Is it possible to simplify this script so that I only get what link has what clicks on what day? No graphs, no charts.
Something like “LINK | DATE | CLICKS”
Currently the graphs load a little slow for me, and on that same token when a user clicks on a link its slow redirecting them. I think I am on a slower server, so someway to make it as simple as possible would be great.
Thanks
Hi Pat,
I doubt a simpler reporting page is gonna happen man. Most feedback I get on that sectin is usually to include more info, not less. To be honest, you’re the first person to ever ask for less data :/
As to the slowness of the links I don’t think it’s because of wp-click-track simply because the pugin doesn’t do any redirection; all urls are left alone it’s just the onclick attribute which is stuffed.
Eric
No problem. Wasn’t sure if it’d be an easy “checkbox” to implement to include less data for slow servers.
I didn’t have the script change my links for me. I did manual links, and updated my links to be something like “?wp_ct=2″
Would my slow redirection be because I am doing that?
My bad Pat, yes using those links the system does do the redirection. I actually forgot that was an option it’s been so long since I’ve worked on the plugin…
As to the cause of the slowness though there’s all sorts of reasons for that under normal circumstances so it’s a little tough to pinpoint the wp-click-track redirection as the cause. For example, it could be due to a network issue, or heavy load or throttling on the server. I do know that I’ve never had one else mention the possibility of that being an issue (though that doesn’t preclude this being the first I know
)
Eric
Eric – certainly could be my server, I won’t doubt that!
Are you suggesting doing the links some other method could result in more promising speeds without “redirection”? If so, how do I go about doing that? I may have missed something in the RTFM
Thanks for the help!
Hi Pat,
Yes, using the parsing method should definitely improve on the redirection delay (since it won’t be used anymore
). Plus, there’s the added benefit that ALL your links will be tracked (depending on what you choose to enable) so it should ease some of the pain of using wp-click-track.
Take a look and please let me know if you run into any issues.
Eric
Perfect! Having them parsed works way faster! I must have had a brain fart and been confused with what that meant for some reason – so I started making my own links. Big mistake
Thanks for helping clarify that… now I’m getting stats on a ton more links that I feared I’d have to replace. I feel like an idiot. Sorry about that unnecessary hiccup
Next question I have, for some reason the Reports page is about 4 hours ahead of my blog time. However when a link is clicked, the click time is correct in my time zone. The reports page is showing stats for GMT time, and I my blog is configured for East Coast time. Any ideas why this is happening?
Thanks again!
Please Eric, help!
Thanks for Sharing a nice plugin for wordpresss Universities Admission
[...] WP Click-Track – This plugin automatically posts and rewrites links in your content (pages, sidebar, posts, [...]
[...] WP Click-Track – This plugin automatically posts and rewrites links in your content (pages, sidebar, posts, [...]
——————————–
IMPORTANT!
——————————–
Here’s one that I have spent countless hours trying to fix, to no avail. I hope you can help me sort this out.
Can you tell me why – on http://workshops.elliottician.com – the plugin is trying to get to all the CSS/JS/etc files using ‘https’ at the start of the link instead of ‘http’?
On my local version of the site (hosted on my computer), it’s linking fine to http (how it should be)… but for some reason the online version is changing everything to https.
This is happening front-end and back-end. Plugin version 0.7.1
This is creating, as you can imagine, a mass of problems. None of the graphs are showing in the backend, and none of the scripts are working because it’s looking for the files in the wrong location.
Do you know of a way to fix this… or maybe a problem/setup step I have overlooked?
Thank you for your time,
Joshua
Hi Joshua,
It looks like you’re using IIS 6 for the webserver which works a little differently. To fix you’re going to have to edit “click-tracker.php”.
At line 523 (ish) replace the below line:
return (isset($_SERVER['HTTPS']) ? str_replace(‘http://’, ‘https://’, $url) : $url);
with:
return (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != ‘off’ ? str_replace(‘http://’, ‘https://’, $url) : $url);
If that fixes it for you I’ll update the main repository with the fix.
Sorry for the issue man; I hadn’t taken into account older web servers (IIS is up to 7.5 now).
Please let me know if you’re good
Eric
Hey Eric,
Thank you so much! Replacing that line did indeed work
Yeah, we’re using IIS 6… shame really. Not as much versatility in IIS as I would like.
Was a little scared at first. Had copy and pasted the code, only to find that the pages weren’t loading – then I realized it had copied a different apostrophe character.
Thank you, once again
Greatly appreciated
Eric you said:
“The only links that get tracked are those inside of posts. Links that are inside of the theme aren’t parsed automatically.
You can manually add the tracking code to the links in the theme though (that’s what I do). Just add the below to the links you want to track; be sure to change the values in the snippet though.
–code–
onclick=”return TrackClick(‘CHANGE TO URL’,’CHANGE TO TITLE’)”
–/code–
Just add that to any link, inside the “a” tag and change the values to the URL and TITLE. I hope that isn’t too confusing.”
…yes is too confusing for me, can you explain it again please? Thank you!
Ernest
Ernest,
In a nutshell you have to add the onclick elements to your links to call the TrackClick function. For example:
Original Link:
<a href="http://yahoo.com">Yahoo</a>
Tracked Link:
<a href="http://yahoo.com" onclick=”return TrackClick(‘http://yahoo.com’,’Yahoo’)”>Yahoo</a>
Just replace the Yahoo details in the TrackClick function with the details of the link you want to track.
Does that clear things up?
Eric
Hi Eric,
sorry but doesn’t work, I did as you said but the link is still not registered by the plugin, look this is the code:
…something must be wrong configured, any idea, please?
Sorry, the link is hidden i tried again
this has something to do?
Enables users to create stand alone trackable links that can be embedded in posts or offsite.
Links should include a title paramater in the href to have the reference name be automatically created. Ex:
link copy
Links without a title attribute will have a default name created.
Ernesto,
The link you’ve embedded above has an extra quote for one of the attributes. That would break it; the link needs to be done properly.
If that isn’t the case can you verify that you’re running WordPress 2.6 to 3.0, on a PHP 5.2 or better server? It’s very odd that it’s not working and at this point I’m thinking it’s either environment or lack of understanding of web development (not to be disrespectful).
Eric
Hi,
this is a great plugin, but of course it gets bigger and bigger after some while. Now I wanted to delete all the links, but I cannot. After confirming the Messagebox it only displays “Bad” and the links are still there ;(
Any solution?
Hi Johannes,
Sorry about that; during the last dev cycle I disabled the reset functionality and forgot to re-enable it. I’ll update the plugin today with the fix.
Eric
[...] my time to do this. I’d do it solely to give some traffic to sites where I comment, but my Click Tracker doesn’t show it’s being used at all. Maybe if I put it in a more prominent [...]
Hey Eric, just wanted to say thanks for this plugin. Also, have you heard of any compatibility issues with WP 3.0?
Good morning Eric. Just downloaded the plugin yesterday. This is about an installation problem. Or maybe percieved problem
I click on the ‘REPORTS’ tab and the page just keeps loading … and loading … and loading. It is like the energizer bunny. I have let it go for an hour and the page still does not fully load.
The other tabs seem to work fine. I can ADD LINKS, LIST ALL and even CONFIGURE ….although I haven’t touch a thing.
Maybe it takes a long time to pharse for the first time? Or maybe I am doing something else wrong?
Any ideas? Blog site is blog.nlyte.com.
Regards,
Hank
Eric .. Sorry, I got confused. I am working on a couple of sites and gave you the wrong URL for the site with the REPORT hang up problem. Try http://www.internetviz.com/b2bsmblog
Thanks,
Hank
Hi Hank,
Sorry for the delays getting to you; I’ve been up against deadlines.
That’s an interesting issue but I’ve never heard of it before; it sounds like something’s timing out. Can you send me a list of what other plugins you’re using at eric@ericlamb.net?
Thanks,
Eric
Hey Eric
I installed the plugin on 2 blogs to test. Please check http://www.batmanpoisonivycostume.com.
If you view source you will see it is adding multiple onclick in href and as result not really tracking anything.
Can you let me know what I could be doing wrong? All I did is install and activate the plugin.
Hi Ravi,
That’s really weird. Can you confirm the format for the links pre-parsed? The format isn’t very rigid but it should conform to the below at least:
<a href="http://www.google.com" title="Google" >Link Body</a>
Eric
I don’t have the title attribute in any href tags. I installed the plugin on an existing site. Do I need to change all hrefs to have a title for it to work?
I have used title attribute on another site. I still get multiple onclick calls in the html code.
On that site when I click the link once, the stats say clicked twice. It is counting wrong stats because of multiple onclicks.
Eric … Thanks for looking at this. Additional information … Plugins you requested are below. I am running WP3.0.1. The progress bar in the lower right corner of the browser hangs about 1/3 of the way through. The message that hangs in the in the lower left corner of the browser is:
“(4 items remaining) Waiting for http://www.internetviz.com/b2bsmblog/wp-admin/admin.php?page=wp-click-track/click-tracker.php”
All in One SEO Pack
Broken Link Checker
FollowMe
Get The Image
Google XML Sitemaps
kStats Reloaded
Profile Pic
Recently Popular
Search Everything
ShareThis
StatPress Reloaded
WordPress Database Backup
Wordpress PDA & iPhone
WP DB Optimizer
WP Super Cache
WP-Click-Tracker
WP-PageNavi
WP-Print
WP-SpamFree
WPtouch iPhone Theme
Thanks again,
Hank
The link display on the widget does not show in my language. How can I chage it?
There aren’t any translations for this plugin; it’s only written for English unfortunately. If you’d like to write a translation file (pot) I’d be happy to incorporate it into the code and make sure you get the credit.
Eric
[...] Pussycat Dolls Thora Birch Tila [...]