In: , , , ,
On: 2004 / 09 / 17
Shorter URL for this post: http://ozh.in/2a

You have a blog. You have stats telling you how many people read it. You post links. But do you have something telling you how many people click on your links ?

Here is it : I'm releasing my latest plugin, Click Counter. Basically, it adds a click counter to links in your posts, as in these examples :
I love WordPress, WordPress and WordPress.
Click on one link and reload the page (hit counter displayed on mouseover link title, in plain text, or both)

Less basically, it comes with a real bunch of options you'll probably never need to tweak, but I wanted to do something as flexible and usable as I could.

Current version : 1.02

Note : you may find sometimes this plugin disabled here on my own server, when I'm tweaking a few things. The plugin is fully functionnal anyway, download it :-)

Note: The plugin is rather well commented, advanced users can probably directly download, edit and run. I'd suggest reading the "How it works" and "Tips & Tricks" sections anyway.

Set up the MySQL table

You need a new table in your WordPress database, named wp_linkclicks (you can modify the name, be sure then to edit the beginning of the plugin properly) Create this table with the following query :

  1. CREATE TABLE `wp_linkclicks` (
  2.  `link_id` INT NOT NULL AUTO_INCREMENT ,
  3.  `link_url` TEXT NOT NULL ,
  4.  `link_clicks` INT NOT NULL ,
  5.  `link_date` DATETIME NOT NULL ,
  6.  `link_title` TEXT NOT NULL ,
  7.  UNIQUE (
  8.   `link_id`
  9.  )
  10. );

Newbie tips : first, install PHPMyAdmin on your website. This is a great interface for anything you can do with MySQL databases. Once it's done, look for the "SQL" link in the menu : click, and paste in the textbox the above code. It will set up the required table for you.

Install

Download the plugin :
ozh-click-counter.zip
Extract and upload to your blog, preserving directory structure if any.
Note: download counter here and stats on wordpress.org may differ and reflect the number of downloads before this plugin was hosted on the plugin directory

The archive contains the tracker file, go.php : put this file in your blog root. If for some reason you want to modify the tracker file name, be sure to properly edit the beginning of the plugin script as well.

Use the plugin

In its default configuration, the plugin needs nothing more. Get back to your blog and post as usual. It will silently add trackers to links in your posts and links in commenters' posts.

A small warning : adding a counter to a link "costs" one SQL query. If you are hosted on a slow server, or if you are teh ultimate linkblogger with 200 external links posted in your frontpage à la Metafilter, you might slightly overload your SQL server :) If this is your case, read by the end of this article the Tips & Tricks, I'll explain how to add a "silent tracker with no SQL query".

Another small warning : the plugin works with proper xhtml syntax, that is href="url" or class="myclass" (quotes), not href=url or class=myclass (no quotes)

How it works

Don't change anything to your posting habits, the plugin is the "install & forget" type.

When your WordPress will print a post with a link, the plugin replaces every link target and title. For example :

  1. <a href="http://www.link.com/page.php">link</a>

becomes

  1. <a href="yourblog/go.php?http://www.link.com/page.php"
  2.  title="XX clicks">link</a>

The number of clicks in the title value will be added to an existing title if specified : title="this is a cool link (XX clicks)"

When someone clicks on this modified link, it will add or update the following values to the table you've created earlier :

  • link_id: the link id, which is more or less useless
  • link_url : the url, "http://www.this-is-a-link.com/page.php" in the above example
  • link_clicks : how many people clicked on it
  • link_date : the date of the first click on it (not the date you posted it)
  • link_title : the title of the remote page, if exists, as defined by its title html tag

Unless stated otherwise, only external links will have a counter added, because it's pointless to track how many people click on your pages. There are stats plugins for this :)
So, if you want to add a counter to an internal file, put a absolute path in the link html : href="http://site/blog/file" instead of href="file"

Template Tags

I've written two "template tags" you can add to your pages

  • wp_ozh_click_topclicks($limit, $trim , $pattern) : displays your most clicked links
  • wp_ozh_click_comment_author_link() : a replacer for comment_author_link() in wp-comments.php, if you want to add a counter to your commenters' website when specified.

As you can see, the first one, wp_ozh_click_topclicks, has 3 optionnal arguments :

  • $limit : how many links you want to display. Default value is 5, and can be modified in the plugin.
  • $trim : maximum length for displayed links title. Setting this for example at 5 will convert "WordPress Home" to "Wordp…". Default value is 15, and can be modified in the plugin.
  • $pattern : html code used to display the list. See right below.

The pattern parameter is an html string with template tags. The default value, as defined in the plugin, is :

  1. <li>
  2.   <a href="%%link_url%%" title="%%link_title%%">%%link_title_trim%%</a>: %%link_clicks%%
  3. </li>

Tags are enclosed in between "%%" and can be :

  • link_id: the link id number in the sql database, I don't see why you would use this one :)
  • link_url : the link url, obviously.
  • link_clicks : the number of clicks the link has received so far
  • link_date : date of first click (more or less useless too, I admit)
  • link_title : remote page title
  • link_title_trim : shortened value of link_title, trimmed to the value of $trim as defined previously.

If the target page has no title, and is html content, the title will be replaced by the url itself. In this case, %%link_title%% will output the url, shortened by its trailing slash and leading http://www. if applicable.

It the page has no title because it's not an html document (http://site.com/somefile.zip for example), it will be replaced by the document name (somefile.zip)

Optionnal configuration tweaking

Now, I'll go through all the variables and their default values you can modify and edit at the beginning of the script. For the interested only, most users don't need so much tweaking and are probably bored of reading this page :)
Note : as usual, I've named the plugin file, functions and vars with a beginning "wp_ozh_click" to prevent any nuclear world war.

Core variables :

$wp_ozh_click['table'] = 'wp_linkclicks'
Name of the table where stats will be stored

$wp_ozh_click['file'] = get_settings('siteurl') . "/go.php"
Name and location of the tracker file

Basic features :

$wp_ozh_click['track_all_links'] = 1
Value can be 1 or 0
If set to 1, every link will have a tracker. Just post as usual.
If set to 0, you will have to specify when you want to add a tracker, with the following code :

  1. <a href="http://site.com/" count="1">link</a>

The value countwill be removed at processing time, so output will be valid html.
The value of count can be : 1, title, inline, or a mix.

  • count = "1" : number of hits will be added to link according to the default behaviour as defined in the script (see below)
  • count = "title" : number of hits added in link title : <a href="http://site.com/" title="69 hits">link</a>
  • count = "inline" : number of hits added in plain text, after the link : <a href="http://site.com/" >link</a> (69 hits)
  • count="title inline" : both : <a href="http://site.com/" title="69 hits">link</a> (69 hits)

$wp_ozh_click['in_title'] = 1
Value can be 1 or 0
Default behaviour for displaying counter (according to $wp_ozh_click['track_all_links'] or to count value in the link html). If set to one, display hit number in link title.

$wp_ozh_click['in_plain'] = 0
Value can be 1 or 0
Default behaviour for displaying counter (according to $wp_ozh_click['track_all_links'] or to count value in the link html). If set to one, display hit number in plain text after the link.

$wp_ozh_click['0click'] = 'No click'
Default text for zero click

$wp_ozh_click['1click'] = 'One hit'
Default text for one click

$wp_ozh_click['clicks'] = '%% hits'
Default text for several clicks, where %% will be replaced by a number

$wp_ozh_click['method'] = 2
Value can be 1, 2 or 3.
There are 3 ways to modify the link html to add the tracker. Each has advantages and drawbacks, but all validate any Doctype up to XHTML 1.1. If you want things to remain simple, just skip this setting and leave its default value
Depending on the chosen method, <a href="http://site.com"> will become :

  • Method 1:
    <a href="http://site.com" onclick="window.location='/go.php?http://site.com'; return false">
    Cool : status bar shows real link without further trick.
    Less cool : doesnt work with "open link in new window"
  • Method 2:
    <a href="/yourblog/go.php?http://site.com">
    Cool : works with "open in new window" and doesn't require Javascript enabled
    Less cool : shows ugly link "/blog/go.php?http://site.com" in status bar
  • Method 3:
    like method 2 but also modifies status bar to hide the ugly and sometimes annoying "yoursite.com/blog/go.php?" part with onmouseover="javascript:window.status='http://site.com'; return false"
    Cool : status bar shows real link.
    Less cool : adds a few bytes of html
  • I'd suggest you use preferably method 2, or at least method 3. Method 1 is really less accurate since it doesn't keep track of links opened in a new window

$wp_ozh_click['do_posts'] = 1
Value can be 1 or 0 :
Do you want to add a counter to links in your posts ?

$wp_ozh_click['do_comments'] = 1
Value can be 1 or 0 :
Do you want to add a counter to links in your commenters comments ?

Now onto the link title features :

$wp_ozh_click['get_title'] = 0
Value can be 1 or 0.
Get remote page title the first time a user clicks a link to store it along with hits in the table. This will slow down the first clicker, by 1 or 2 seconds maximum, time for your website to retrieve the distant page and parse it.
Note : mostly untested feature. It uses fopen(), check your host has enabled this (if not, the plugin will work anyway, and title will simply be empty)

$wp_ozh_click['get_title_forcerefresh'] = 50
Value is an integer.
Refresh remote page title every XX clicks. Set to 0 if you don't want to use this feature. If you chose to use it, the higher traffic – then clicks – you get, the higher you should set this. Examples : 50 for Joe's blog, 3000 for Slashdottish blog.
To be honest this is really a gadget – almost totally useless :)

$wp_ozh_click['extensions'] = array ( lots of extensions )
Most common non html file extensions. These are files that have no title html tag, so their link title will be the file name (somefile.zip for example)

Then, top link features :

$wp_ozh_click['top_limit'] = 5
Default number of top links to be displayed by wp_ozh_click_topclicks() (see above, Template Tags)

$wp_ozh_click['top_pattern'] = '<li><a href="%%link_url%%" title="%%link_title%%">%%link_title_trim%%</a>: %%link_clicks%%</li>'
Default pattern used to display top links (see above, Template Tags)

$wp_ozh_click['trim'] = 15
Default maximum length of link titles (0 not to trim)

Tips and Tricks

Here are listed a few tips or thoughts I've had during the development and test of the plugin.

» As a file download counter
You can use this plugin as a download counter to see how popular are your files :-P
To do so, you can either specify count="1″ in the download link html tag, or link them with an absolute file (http://site/blog/download/file.zip)

» Use with Matt's Asides
If you are using Matt's asides or something similar, you'll have to modify a bit your index.php
Replace

  1. echo wptexturize($post->post_content)

with

  1. echo wp_ozh_click_modifyhrefs(wptexturize($post->post_content))

» Use with blogrolls
Similarily, if you want to use the feature on a blogroll link list for example, modify the php code to add wp_ozh_click_modifyhrefs().
Remember one thing : each link counter display (in title on in plain text) will cost 1 SQL query. Know what your server can handle before doing such things :)

» Invisible tracker for weak SQL servers
You can use the plugin to track clicks at no SQL cost : set $wp_ozh_click['track_all_links'], $wp_ozh_click['in_title'] and $wp_ozh_click['in_plain'] to zero. It will still modify your link html tags to add the tracker file to them, but it won't display hit counters along with links.
Now, check your link clicks from phpmyadmin directly, or using the template tag wp_ozh_click_topclicks() (1 SQL query)

History

1.0 :

  • Initial release

1.01 :

  • improved : only one query if same url repeated
  • fixed : no javascript in links for rss outputs (so the feed validates)

1.02 :

  • fixed potential SQL injection

Wow

It took me almost longer to write this doc than to write the plugin itself :)

Shorter URL

Want to share or tweet this post? Please use this short URL: http://ozh.in/2a

Metastuff

This entry "Click Counter Plugin For WordPress" was posted on 17/09/2004 at 4:58 pm and is tagged with , , , ,
Watch this discussion : Comments RSS 2.0.

527 Blablas

  1. Ozh says:

    Nate » This feature is present on version 2.0 of this plugin… that I still have to release:) This month probably, I need some time to update the docs and stuff.

  2. Nate says:

    Ozh-

    That is great news to hear! Thanks!

  3. Ozh > Firefox pose problème avec le clic-droit car il propose alors de télécharger le fichier "go.php" et non le fichier cible. (Voir mon site pour une démo en ligne)

    Pour ce qui est de forcer le téléchargement, n'étant pas initié du tout, pourrais-tu me dire si j'ai mis mes nouveaux header à la bonne place ?

    1. &lt;?php
    2.    
    3. require('./wordpress/wp-blog-header.php');
    4.    
    5. if (!headers_sent()) {
    6.     header('Expires: Mon, 23 Mar 1972 07:00:00 GMT');
    7.     header('Cache-Control: no-cache, must-revalidate');
    8.     header('Pragma: no-cache');
    9.     header("Content-type: audio/mpeg");
    10.     header("Content-Disposition: attachment");
    11. }

    Note : J'ai essayé avec différentes variantes pour Content-type : application/force-download, audio/force-download, … chaque fois sans succès.

    Ce que j'ai constaté en fait c'est que le fichier "go.php" lui-même changeait bien de type mais pas le fichier cible.

    Est-ce que le fait que mes liens soient sur un serveur distant (commençant en http://…) peut jouer ?

    N'hésite pas en tout cas à me suggérer tes pistes ; si elles n'aboutissent pas, je demanderai son avis à un développeur WP avec qui je suis en contact en ce moment, je te donnerai sa solution s'il trouve.

  4. Frank Lucas says:

    WordPress: v2.3.2
    MySQL: v5.0.45-community-nt
    PHP: v4.4.7
    Server: Microsoft-IIS/6.0
    Firefox v2.0.0.11

    Your documentation is very impressive. So, can a non-developer get any use out of this plugin? Frankly, I can't even figure-out how to show a list of click-thrus recorded (if they were) by this great plugin. I wish I could figure-out how to make it work.

    Regards from Stupid User.

  5. Ozh says:

    Frank Lucas » Use wp_ozh_click_topclicks($limit, $trim , $pattern) as explained in the doc here.

  6. Damjan says:

    I was looking just a counter for visitors on my page, but here is a lot of code I don't understand for what it is, I installed plugin but doesn't work, there I can't see any counter.
    Is this a right plugin for me?

  7. Ozh says:

    Damjan » No.

  8. Bonjour,

    Je suis finalement parvenu à forcer le téléchargement en modifiant légèrement le fichier "go.php" (remplacer "audio/mpeg" par le type de fichier souhaité ou par l'intitulé générique "application/octet-stream") :

    1. &lt;?php
    2.  
    3. require('./wordpress/wp-blog-header.php');
    4.  
    5. if (!headers_sent()) {
    6.     header('Pragma: ');
    7.     header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
    8. }
    9.  
    10. if (@$_SERVER["QUERY_STRING"]) {
    11.     $url = $_SERVER["QUERY_STRING"];
    12.    
    13.     if (function_exists('wp_ozh_click_increment'))
    14.         $click= wp_ozh_click_increment($url);
    15.  
    16.     if ($is_IIS) {
    17.         header("Refresh: 0;url=$url");
    18.     } else {
    19.         if (!headers_sent()) {
    20.             header('Content-Disposition: attachment; filename='.basename($url));
    21.             header("Content-Type: audio/mpeg");
    22.             header("Content-Length: ".filesize($url));
    23.             readfile($url);
    24.             header("Status: 303");
    25.         } else {
    26.             print "location.replace(\"$url\");";
    27.         }
    28.     }
    29.  
    30. } else {
    31.     echo "Hmmm ? ";
    32.     if (function_exists('get_settings')) {
    33.         echo "<a>Back to Blog</a> !";
    34.     } else {
    35.         echo '<a href="/" rel="nofollow">Back to the root</a> !';
    36.     }
    37. }
    38. ?&gt;

    Reste la question de l'obtention de la taille du fichier. Car si la fonction filesize() récupère sans problème la taille d'un fichier situé sur le même serveur que la page PHP, en revanche il ne le fait pas directement sur un serveur distant. D'où pour le moment l'affichage de "Taille de fichier inconnu" lors du téléchargement.

    Aurais-tu une idée du comment résoudre cette question ? (J'ai trouvé des choses sur Google mais elles me semblent bien compliquées)

  9. Note : Voir s230648226.onlinehome.fr pour une démo du script ci-dessus.

  10. Miracle ce code trouvé via Google semble bien marcher pour calculer la taille des fichiers distants (il nécessite en revanche de donner le chemin complet en http:// des fichiers situés sur le serveur local) :

    1. if ($is_IIS) {
    2.         header("Refresh: 0;url=$url");
    3.     } else {
    4.         if (!headers_sent()) {
    5.        
    6.          function filesize_url($url,$port){
    7.                 $size=-1;
    8.                 $site=substr($url,7,strpos(substr($url,7),'/'));
    9.                 $errstr='';
    10.                     if($fp=@fsockopen($site, $port,$errno,$errstr)){
    11.                     fputs($fp,"HEAD $url HTTP/1.0\r\n\r\n",strlen("HEAD $url HTTP/1.0\r\n\r\n"));
    12.                     while(!feof($fp)){
    13.                     $buffer=fgets($fp, 1024);
    14.                     $split=explode(' ', $buffer);
    15.                         if($split[0]=="Content-Length:"){
    16.                         $size=(int)$split[1];
    17.                         break;
    18.                         }
    19.                     }
    20.                 fclose($fp);
    21.                 }
    22.                 if($errstr!='' || $size==-1) return false;
    23.                 return $size;
    24.                 }
    25.  
    26.             header('Content-Disposition: attachment; filename='.basename($url));
    27.             header("Content-Type: audio/mpeg");
    28.             header("Content-Length: ".filesize_url($url,80));
    29.             readfile($url);
    30.             header("Status: 303");

    Démo à la même adresse que plus haut ; si tu as des correctifs pour rendre le code plus "propre" (je n'y connais rien) n'hésite pas.

  11. J'ai parlé un peu trop vite car si le téléchargement forcé marche bien sous Firefox, en revanche sous Internet Explorer ou bien avec les gestionnaires de téléchargement, le téléchargement ne s'effectue pas du tout.

    Internet Explorer interprète en outre le type du fichier comme "HTML Plugin File".

    Une idée ?

  12. Problème résolu en supprimant la ligne :

    1. require('./wordpress/wp-blog-header.php');

    ps. Dans les Comment Guidelines de ce site, il manque un slash à "or generic "

  13. Bonsoir,

    Je viens de me rendre compte que je rencontre un problème après la suppression de la ligne :

    1. require('./wordpress/wp-blog-header.php');

    En effet la fonction wp_ozh_click_increment est rendue inopérante :

    1. if (function_exists('wp_ozh_click_increment'))
    2.         $click= wp_ozh_click_increment($url);

    Pourrais-tu stp m'indiquer quelles sont les lignes à ajouter à mon fichier "go.php" pour que cette fonction remarche ?

  14. Ozh says:

    litteratureaudio » Ma foi, si en supprimant une ligne, une autre ne marche plus, c'est donc que la premiere était nécessaire à la seconde, non?

  15. Bien d'accord avec toi mais là il est intéressant de remarquer que c'est la ligne :

    1. require('./wordpress/wp-blog-header.php');

    qui parasite en quelque manière les infos qui suivent. D'où l'idée que j'ai de supprimer cette ligne pour ne rajouter que l'absolu nécessaire.

    J'ai ainsi tenté d'ajouter les fonctions wp_ozh_click_getrealpath() et wp_ozh_click_increment() dans le fichier "go.php" mais on me répond qu'il est impossible d'éxécuter cette ligne :

    1. $url = wp_ozh_click_getrealpath($wpdb-&gt;escape($url));

    Fatal error: Call to a member function on a non-object in /homepages/28/d230648204/htdocs/go.php on line 34

    Apparemment $wpdb serait donc un non-objet. Aurais-tu une piste pour l'instancier/contourner ce problème ?

  16. Ozh says:

    litteratureaudio » Si tu supprimes wp-blog-header.php, tu supprimes l'accès à toutes les fonctions (et objets, classes, etc) de WP (celles des plugins y compris). Si tu veux accéder aux fonctions de WP, tu dois inclure wp-blog-header.php. Voilà le dilemne.
    Essaye eventuellement d'inclure wp-config.php à la place de wp-blog-header.php …

  17. Je ne veux pas m'enflammer (je suis depuis ce matin sur la question…) mais a priori cela fonctionne ! Merci beaucoup pour ton conseil éclairé.

  18. samy says:

    salut

    j'ai besoin de ce plugin mais ila po marcher avec moi

    j'utilise 2.3.2

    et je le utilise out WP directory … all fonction bien
    "../../wp/wp-wp-blog-header.php" in a costume page

    j'active le plugin et j'ai ajouter le code a db

    mais quand je pose ce code
    link
    ou
    link
    rien se vois comme l'exemple mais le fichier se telecharge l'infobull toujour affiche XX clicks
    j'ai besoin d'aide svp!

  19. Ozh says:

    samy » désolé je ne peux pas t'aider

  20. Riz says:

    Can you please tell me how to use Template Tags you mentioned, suppose if I want to Top clicked links in sidebar how would I do that ?? Can I do it through Text widgets !!
    Secondly, this plugin is not working with the link if Thickbox plugin is enabled on it ..
    Eg. if a link is

    1. <a href="H**p://www.blabla.com/abc.php?KeepThis=true&amp;TB_iframe=true&amp;height=500&amp;width=800" rel="nofollow">LINK</a>

    , then it doesnt show the number of clicks !!!
    Other than that, this plugin is awesome! cant wait for the new version..

  21. Leland says:

    Sorry if this was asked previously, but why am I getting a 406 Not Acceptable error when I try to click an outgoing link with go.php? Here is what it says: "An appropriate representation of the requested resource /go.php could not be found on this server."

    Am I doing something wrong? Is it something to do with my server configuration? Thanks in advance.

  22. Ozh says:

    Leland » Never heard of such a problem. Don't know what can cause it…

  23. Nicola says:

    Hello :)

    Thanks for the wonderful plugin, it works like a charm :)
    I have just one problem: i placed a banner just after the of every WP post, and the Click Counter does not show clicks over that banner…. maybe does not work with anchors on img tags? Or maybe because it is out the "content loop" of WordPress?

    Thanks in advance – Nicky

  24. Ozh says:

    Nicola » Indeed, the plugin takes care of links within post content. Anything outside post content, thus outside the loop, is ignored. Note that I have a version 2 ready for this plugin that brings a lot of improvement, including adding a counter to any link you want, no matter where it is on your page.

  25. Nicola says:

    @Ozh

    thanks for your quick reply…. we will wait for newest version :)

  26. wpthemes43 says:

    Cool Eagarly awaiting the new plugin just what i need for my new site im building

  27. Leland says:

    Even though noone else is having this problem (see comment #321) I found out what's wrong and wanted to give an update. Basically it's a mod_security issue with Apache which was causing the go.php script to not function. Adding the following lines to .htaccess made it work.

    1. SecFilterEngine Off
    2. SecFilterScanPOST Off

    Although I'm not sure if doing this has any downside, like causing some security vulnerability. Hopefully not though.

  28. Ozh says:

    Leland » Nice, thanks for this info. I'll try to mention something about this when I update this page when I update the plugin. However, it seems a bit overkill to completely disable mod_security for one plugin to work: there is probably a more selective way (ie adding a custom rule just for the go.php file)

  29. Taurin says:

    hello, how can i include this "Viewed: xxx times" in my template?

    thanks and kind regards

  30. Ozh says:

    Taurin » With a page view plugin.

  31. Taurin says:

    OK, thanks, thought I could use your one…. Now I use this: http://downloads.wordpress.org/plugin/wp-postratings.1.20.zip

  32. Top Jock says:

    Howdy and thanks for such a cool plugin.

    Will the wordpress-supercashe plugin cut down the hits on the SQL server?

    I'm on a shared host and they really don't like you using there DBs for stats or tracking.

    Thanks,
    -TJ

  33. phx says:

    Hi,

    is it possible to show the clicks formated. Like with more space from the URL.

    For Example:

    URL ——– Some Text —— Clicks

    Thanks for help :)

  34. Ozh says:

    phx » Out of the box, no, but look at the function that returns the top X clicks and it will be easy to customize it to suit your needs.

  35. itsgreen says:

    what will this do with targets?

    ie. I have links that are target="_blank" and target="framename".

    And will this only check 'content' links or also other links on the page? I have a function on my site that enables the post title to become an external link, will it automaticly parse this title to go.php?http://original.external.link ?

  36. Ozh says:

    itsgreen » nothing, only content, and probably.

  37. Travis says:

    Hey Ozh,
    I noticed in a few comments earlier this year you mentioned you were near releasing version 2.0 of this incredible plugin soon.

    I was wondering if we might see it in the near future?

  38. viar says:

    thank you, very usefull plugins

  39. hatmos says:

    Bonjour et merci pour ce plugin.

    Je suis en WP 2.5

    Je le test et j'ai un problème avec les liens internes, en effet mes liens vers des screenshots de mon site sont comptabilisés, si j'ai bien compris c'est du au fait que mes liens sont sous la forme http://monsite.com/… au lieu d'un lien relatif.

    Mais je t'avoue que ca m'embête fortement de repasser sur les posts pour modifier le code, d'autant que j'utilise la galerie WordPress 2.5 qui formate les images de cette manière …

    As tu uns astuces pour exclure son propre domaine ?

    Cordialement,

  40. Ozh says:

    hatmos » Si ma mémoire est bonne, dans la version 2.0 qu'il faut que je peaufine avant release (ce mois-ci peut-être) il y a l'option d'exclure son propre domaine. Là, non.

  41. Georg says:

    Hey Ozh,

    thanks a lot for this nice one! :-)

    Just a little question: Is there any best practise solution how to include a resultpage with the captured data into the admin panel?

    Maybe you want to add a little comment on that?

    Merci beaucoup! ;-)

    Georg

  42. Ozh says:

    Georg » I'm not sure I understood the question :) Feel free to contact me by mail to give more details (ozh at planetozh dot com)

  43. […] o di qualche script o di qualche plugin già bello impachettato e pronto all'uso; ho trovato Click Counter, un plugin che registra in Mysql quante volte un link è […]

  44. george says:

    is it possible to track which user click on which file?
    For example, you have users A,B,C,etc…, Z
    Can you add a extra table to keep track of those wordpress users, like link_Users?

  45. Ozh says:

    george » Not possible at the moment, and I don't think I'll implement this feature

  46. andras says:

    Very nice plugin!
    I would like to use it for images with external links in posts, displaying the number of hits (with the option of "plain text" set to 1), but the containing span should appear before the a href tag.

    Is there any option or trick to change the order of the results or just displaying only the [span class="hitcounter"] and the number of the hits?

  47. […] Clickcounter – Consente di tener traccia dei click sui link del vostro blog. […]

  48. Heyi says:

    Wow, nice plugin! I'm trying it now.:) Thank you so much.

  49. […] Ozh' Click Counter – ?????? ??? ???????? ????????? ?? ??????? ? ???????? ? ?????????. * […]

  50. Benjamin says:

    Dear OZH,

    Thanks for creating this wonderful plugin. Unfortunately the plugin creates problems after my upgrade to wordpress 2.5.1. Many links on the site do not work any longer, but give an error like "The requested URL /blog/go.php?http://www.benjaminblom.nl/blog/?p=196 was not found on this server."

    I disabled the plugin, but I hope you can fix the problem.

    Best regards from Holland (we won from Italy 3-0)!

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>
Gravatars: Curious about the little images next to each commenter's name ? Go to Gravatar and sign for a free account
Spam: Various spam plugins may be activated. I'll put pins in a Voodoo doll if you spam me.

Read more ?