@mattab opened this issue on January 4th 2008

phpMyVisites supports ClickHeat (http://www.labsmedia.com/clickheat/) and Piwik could do the same.

The DEV version is available on http://www.labsmedia.com/clickheat/piwik/piwik-clickheat.tar.gz This is DEV only and may not work with latest trunk.

If you're interested to contribute please contact hello at piwik.org and yvan DOT taviaud at m4am.net Keywords: third-party-plugin

@mattab commented on July 7th 2009

Attachment: Heatmap plugin for Piwik piwik-clickheat.tar.gz

@gka commented on August 16th 2010
@robocoder commented on January 22nd 2009

www.mapsurface.com has an interesting widget that combines click location information & some basic visitor information.

@dugwood commented on February 1st 2010

Sorry, I've been really busy these months... I'm looking at the package right now, I'll give you updates soon.

@dugwood commented on February 2nd 2010

I've just released a fixed release here: http://www.labsmedia.com/clickheat/piwik/piwik-clickheat.zip

Can anyone give it a try?

Matt, can you change the url in the description to match this new one? Thanks. Can we add this plugin in the main package?

@dugwood commented on February 2nd 2010

Installation instructions: just unzip the file in your piwik/plugins/ directory, as there's already a subdirectory ClickHeat in the archive. Then go to your Parameters' page in piwik, and enable the plugin.

Please report any error you may see, even if it's working, thanks.

@dugwood commented on February 2nd 2010

I think you've both got the same error: can you remove the line: PluginsInstalled[] = ClickHeat

under [PluginsInstalled] in the piwik/config/config.ini.php

Then just list the plugins in the Parameters' tab.

The issue here is that ClickHeat is already installed, and the new install() function isn't called as it should be.

Matt: is there a function to run an upgrade, say I've made a change in a release, someone installs it but was on another release before, I want to update some things in his configuration file or anything else like this? Something equivalent to private function installPlugin( Piwik_Plugin $plugin ) in Piwik_PluginsManager.

@dugwood commented on February 2nd 2010

Do you have any Javascript errors? Which release of piwik do you use (I tested it against 0.5.4 only)? What browser?

May be you changed some paths in your configuration, and I mostly copied-pasted many things such as plugin directory and things like that (so bad there's no function to get the plugins' path easily or I didn't look enough).

The groups' list will remain empty until you click on a page with the javascript code installed on. So first issue is that you can't access the Javascript panel.

Does the following page work: http://yourwebsite.com/path/to/piwik/index.php?module=ClickHeat&action=javascript

you should see a badly shaped form.

@dugwood commented on February 2nd 2010

Dawn it! I did fix the error of manne in my test, but I totaly forgot in the main file. So that's still an error, thanks tino for pointing it out.

For the rights on the file, I've reverted back to http://www.labsmedia.com/clickheat/piwik/piwik-clickheat.tar.gz (I can't find any good information in the zip manual).

@dugwood commented on February 2nd 2010

Hello Dominick,

You have to download this file: http://www.labsmedia.com/clickheat/piwik/piwik-clickheat.tar.gz

Then extract it, and move the ClickHeat/ directory into your plugins/ directory, so that you'll have: /path/to/piwik/plugins/ClickHeat/

Else it won't work. As the archive is made, you should extract it directly in the plugins/ directory of piwik

@dugwood commented on February 3rd 2010

Hello Kay,

Yes, you have to add some extra code to your webpage. That's because it's a totally different process, and further more you may not generate the same thing in piwik and ClickHeat depending on your needs (and I didn't use piwik enough to tell you if both can operate exactly the same way).

So for now it's a dedicated script. However, as we need to make a ClickHeat with MySQL support, I may take this point into account.

@robocoder commented on February 3rd 2010

blade106: I updated the URL in the description. There's no support, currently, for plugins to manage their own config file since Piwik_Option meets most use cases. But there is support for plugin-specific update scripts. (see GeoIP)

@dugwood commented on February 3rd 2010

vipsoft: I'm sorry, I've changed the path of the file (because of ZIP permissions...). So it's: http://www.labsmedia.com/clickheat/piwik/piwik-clickheat.tar.gz

I didn't see Piwik_Option. I'll look at it later, as it's working with basic information (although I had to change some of the main ClickHeat files, so I think I'll rewrite all the config module one day taking Piwik into account).


@dugwood commented on February 19th 2010

That's true I didn't test it with another account... Rights are not easy to understand as I didn't look at the main piwik code at all. Let me look at this, I'll keep in touch soon.

@dugwood commented on February 19th 2010

I can't figure it out... Another user with(out) admin permissions is working quite fine for me. Can you track the redirect? So we can see where the problem is. A good start would be to run LiveHttpHeaders (firefox plugin), to see what redirects are made (look for a Location:).

Perhaps the issue is in your website (the one loaded in the background iframe which appears behind the heatmap), with a redirect in Javascript. But if another account can see the page without the redirect that should not be the issue.

@mattab commented on February 19th 2010

johnol, can you provide blade106 with your Piwik access credentials? seeing the error live would help debugging it. thx

@dugwood commented on February 19th 2010

Just create a new user with the good permissions, and send me the link to your piwik statistics, that would be good. Thanks! (mail in the subject of this ticket)

@mattab commented on February 19th 2010

please send your details to yvan DOT taviaud at m4am.net

@robocoder commented on April 3rd 2010

Try creating a .htaccess file in the ClickHeat/libs folder that contains:

<Files click.php>
Allow from all
Satisfy any
@dugwood commented on May 10th 2010

So far I've never tested piwik 0.6, so I can't tell what's going on. And I've too little free time to look at this issue right now. I hope someone can help you for now. From the errors, I would say that the file is loaded twice, but I've got no idea why. Does the heatmap work or not at all?

@Tomcraft1980 commented on May 18th 2010

Unfortunately doesn't work with Piwik 0.6.1. No error messages are displayed, you simply cannot activate the plugin.

@Tomcraft1980 commented on May 31st 2010

The fixed files are great! No more messages in plugin-section.

My problem was the config.php file wasn't writable. doh datz

@mattab commented on May 31st 2010

ChristianSchneider, can you please submit the new clickheat.zip with your changes that make it work as expected?

@Tomcraft1980 commented on May 31st 2010

Replying to ChristianSchneider:

@techeroaleman and all: I had the same problem, but it can be fixed by changing the coding for the language files from constants to array. Attached I will try to upload an english and german file, where fixed the error. You have to put the files in plugins/ClickHeat/lang. Overwrite the existing files after a backup of them. If you are using another language, try to change the coding.

@Tomcraft: Maybe it is the same problem. But for it worked under 0.6.1 and it also works on 0.6.2. Maybe you can try to look at your server log files if you can find some information.

Oh no... =(

Noew the error messages just have moved from the settings/plugin page to the clickheat page. gg

@mattab commented on June 29th 2010

To all clickheat users (or who tried), is there anyone who got it working? I will take a look soon to fix issues. Sorry about the delay!

@dugwood commented on July 4th 2010

The real issue is that Piwik loads twice the same file...

The rewrite of the file has no useful effect, as ClickHeat only use constants and not the $translations array.

I'm releasing a fix right now, please wait a few hours.

@dugwood commented on July 4th 2010

Fix released. Download it at the same url as before: http://www.labsmedia.com/clickheat/piwik/piwik-clickheat.tar.gz

Jan, I wasn't able to reproduce the bug, even if I'm also on Firefox. Can you tell me what went wrong (you've got my email on [#comment:44])

@dugwood commented on July 5th 2010

May be the fix for the language solved it (that's possible as there's some JS in the main HTML file, that may be corrupted with those error messages).

I've added Google Chrome in the list of browsers.

@dugwood commented on July 6th 2010

This issue is well known, as I've talked with Matt about it 3 months ago. I hope he'll finally look into it :-)

ClickHeat may be modified to limit the list of websites to the current website (I thought I've done this, but seems that's not true). But I'm waiting for the rights management part, as it prevents me to work correctly because of the loop.

For the htaccess, as I'm not running Apache, I can't test it. So can you confirm me this: - should be in /plugins/ClickHeat/ directory - contains the code available in [#comment:49]

@dugwood commented on July 6th 2010

.htaccess added in the archive.

For the endless reload, this was discussed in a mail, following [#comment:36]. Matt let us know when the issue is fixed, so just wait a little bit (may be we'll end up on 1.0 directly).

@dugwood commented on July 22nd 2010

You should use another code than the first option (when you created the Javascript code). Else, in piwik, you can't track easily each page.

So use the option of tracking by url (page's address), this will do the trick.

@dugwood commented on August 10th 2010

I'll check this tomorrow. There have been too many releases of piwik this summer :-D

@dugwood commented on August 11th 2010

Fix released (same url as before to download it).

Matt, why do you run init() on the Plugin multiple times? Even if I remove it from the view(), the init() method is loaded twice. I've set a static variable to forbid a new call, but that's weird to init() twice the same Plugin...

@robocoder commented on August 11th 2010

init()? did you mean install()?

@dugwood commented on August 11th 2010

I meant init(), really :-)

The plugin init() method is called twice, and the fact that I used define() triggered the error (constant already defined).

My old method was starting with: /** * Main method */ function view() { $this->init();

But even if I disable it, it's called at least twice. I'm using the latest (after update) release of piwik.

@robocoder commented on August 11th 2010

If you're subclassing Piwik_Controller, then you should be aware that init() is defined in the base class and automatically called by the constructor.

@dugwood commented on August 11th 2010

Okay, that's a new behaviour as it was not the case in 0.6.3. I've fixed it, by removing my $this->init() call. I just got tricked by the fact that the page is generated by many calls, and thought it was the same call, whereas it was another init() bad call.

So it's okay in the new clickheat-piwik file.

@dugwood commented on August 12th 2010

I didn't get your point (don't know where you found the Enter). Where is the issue (page, url...) and when did it happen? Can you send us a screenshot?

@Tomcraft1980 commented on August 14th 2010

Is it possible to reset the tracked data to start after the layout of the webpage has changed?

@Tomcraft1980 commented on August 14th 2010

Replying to Tomcraft:

Is it possible to reset the tracked data to start after the layout of the webpage has changed? Got it... /tmp/clickheat/ needs to be deleted.

@mattab commented on August 14th 2010

To all ClickHeat users, is the plugin work as expected? Are there any blocker/critical bug?

@gka commented on August 16th 2010

I just installed the current DEV version on Piwik 0.9 and found a strange bug in the ClickHeat report. Seems that the ClickHeat plugin displays an IFrame with another instance of Piwik. Could it be that ClickHeat requires my site to be on the same domain as Piwik? The IFrame targets to the web-root "/".

@dugwood commented on August 18th 2010

@Jan: I'll look into this issue soon.

@greg: I don't see any bug here. You need to record data first, so just install the Javascript code as asked for on the No log... warning. When you'll have some records, the good URL will be set automatically.

@gka commented on August 18th 2010

I would suggest a slightly different behaviour.

When opening the ClickHeat admin page with no recorded data, the user should just see a help screen which explains the next required steps. There is no use in showing the IFrame, in my case the iframe even overlapped with the warning, so it was harder to read.

Have you looked at the attached screenshot?

@dugwood commented on August 20th 2010

@greg: this scenario has been the same from the first public release of 0.1 and next. No one asked me about it since then (should be some years now). So I'll see if I change it or not, but many things are urgent.

@kowalikus: a new release has been made a few days/weeks ago, it includes the fix for the multi-call on init(). For the super-access part, I've just implemented your fix, thanks a lot! New release will be available in a few minutes (same url as before). Finally, for your website configuration: as your website is 960px wide, you should select fixed centered width, of 960 pixels. Screen resolutions are not an issue as soon as you provide this info. You can change this information by clicking the icon right next to the group's dropdown.

@dugwood commented on August 20th 2010

@greg: in fact there was an issue: the stylesheet (in piwik) was missing for the element. I've added a background, so that it can be easily read. That's explain why people didn't care about in the original release.

@halfdan commented on August 29th 2010

Hi luk, thanks for investing your time in this. However it would be better to provide your changes as a diff patch. Have a look at http://dev.piwik.org/trac/wiki/PiwikDevelopmentProcess#Howtosubmitapatch on how to submit a patch.

@dugwood commented on August 30th 2010

Hello luk, I'll try to check it during this week and apply your fix. Thanks for your help.

@dugwood commented on August 30th 2010

I'm looking at the issue you've stressed out: - I'm okay on the regex fix, I'm too used to use "~" as a delimiter in PHP to avoid the / issues... - for the === thing, the fact is most of the syntax is totally changed. So that will break some part of ClickHeat. Even if I do like XHTML and clean code, JSLint was never a good standard as many browsers handle Javascript differently. Hence if (e == undefined) becoming if (e === undefined) will mostly break, and should then be written as if (!e) (as specified in the JSLint will hurt your feelings). But that may be a good solution too... So I'm on it, don't know how long it'll take to fix everything to be JSLint okay.

@dugwood commented on August 31st 2010

It may break things if not used correctly. If you're a PHP coder too, you may know the difference, else here is one example: if (e == 0) becomes if (e === 0) if e is the number 0, both will return true. If e is the string "0", the second should return false, as the type is not the same. If e is an empty string "", first one may be true, the second will be false. And if e is undefined, I think the first one would be true, and the second one false. In this case, the use of === is bad (if you are to compare with variables that are not numbers), and as JSLint's FAQ says: use "!" in this case => if (!e). But this may be necessary to use === :-) It's true that I always use it in PHP (about 99 times out of 100), but I know exactly what I'm doing with PHP (even with it's loose variable typing). In Javascript, it's sometimes hard to know how every browser will react, so it's harder to code with standards. But I'll try to make it happy, and I'll make a JSLint checker in PHP to do this easily :-)

@dugwood commented on September 1st 2010

File has been updated, and should be available right now on the same link as before. Can someone test this new file? Thanks.

@dugwood commented on September 29th 2010

Thanks Brandon,

Can you send a screenshot to picture the image issue?

For the IP blacklist, there's a cookie option in ClickHeat, but I don't remember if I've ported it to piwik (a link like Remember my clicks?).

@dugwood commented on October 22nd 2010

The IP solution wasn't ported into ClickHeat as I thought it was difficult to use for many people. Here we have a simple cookie, set or not, that's really easy.

Perhaps I'll port it, at least I'm adding it to my todo.

For the second point, this may be an issue. You should only see the groups of your current website.

Also, I think you haven't set the layout for your page: click on the icon right next to the groups' dropdown, and set your layout as fixed and centered (and define the width). This will show clicks much better :-)

@dugwood commented on November 25th 2010

The "start" param is whether ClickHeat use Monday or Sunday as first day of week. So this will have no effect.

I'll look into it soon.

@dugwood commented on November 25th 2010

Fixed! The start date was set in Javascript in original ClickHeat, and not in Piwik. So I've fixed it. You should download the new file at the url above. Please leave a reply to tell if it's fixed for you too.

@dugwood commented on November 25th 2010

Yes, that's the official release. There's no development release for piwik in fact.

Just overwrite your libs/ClickHeat dir with this one, and this should do the trick.

@dugwood commented on March 28th 2011

Hello, I'm sorry I haven't much time for now, I'll look into you issue by the end of April, may be sooner, but I can't tell for now. Just wanted to say: I know you're in trouble :-)

@dugwood commented on April 23rd 2011

Try to delete the clickheat directory within /www/vhosts/piwik.foobar.com/htdocs/piwik/tmp/cache/

Safe mode is a real pain... If it doesn't help, I don't know how to fix this (the issue is that the Apache user isn't the same as the FTP user, hence you can't create files using Apache if the directory is owned by the FTP user).

@dugwood commented on April 24th 2011

Do stick with FastCGI if possible. So great for tuning a webserver against memory overflow (limited number of PHPinstances running, easy to limit without limiting server's MaxClients).

@dugwood commented on May 22nd 2011

I'm finally working a bit on this.

Thanks motin for pointing out the issue on files. I've set 0644 on files and 0755 on directories. But I can't find your .htaccess file (I've just upgraded to 1.4, and can't see it). Are you sure it's not a file you set up yourself? Also I'm on lighttpd, hence .htaccess files doesn't work, so I can't test it.

I'll update the tarball when the issue reported by tyroden is fixed (I'm working on it!)

@dugwood commented on May 22nd 2011

New release is available (always at the same url). Changes include: - fixed files permissions (as said just above) - list only groups from the selected website (hence you need to first select a website to see clicks from this website) -- solves tyroden issue - fixed Ajax support, as it wasn't using the parameters sent after the hash (#) in the piwik url.

For the IP filtering, I've tried to get the data from the API, but it's way too complicated. If someone can point me to a piece of code to know if an IP is excluded, that would be great. I've tried using Piwik_SitesManager_API or Tracker/Visit, but that wasn't easy. The main issue is that I'm not in a piwik environment, hence I need to load a lot of classes, and that would be a performance breaker for ClickHeat.

@robocoder commented on May 22nd 2011

re: .htaccess: for newer Piwik releases, this is created by the installer if it detects an Apache web server in use

re: IP filtering: you can try loading the .php cache files in tmp/cache/tracker where excluded_ips is an array of ip addresses in CIDR notation; most of the IP address handling code is in core/IP.php

re: logging. Have you looked The LOAD DATA INFILE code introduced in 1.4? I've done some refactoring for 1.5 that should make it more general purpose. We should probably look at ClickHeat's logging and see if cam benefit from the proposed bulk loader in #134.

@dugwood commented on May 22nd 2011

.htaccess: I've created a light file in plugins/Clickheat, can someone test it? It's just:

<Files ~ "^click\.php$">
        Satisfy any
        Allow from all

This should be enough for what is necessary here.

IP: it's quite strange to do it that way, but I've done it as you said. Hope this helps :-)

Logging: Clickheat doesn't use SQL at all. Everything is logged in files, directly. For Clickheat 2.0 (planned for... years), with SQL support, I sure will use such a thing.

@dugwood commented on July 3rd 2011

That's because it should be /plugins/Clickheat/ and not /plugins/clickheat/ (typo error). Did you rename the directory? I don't recall changing anything to the package generated.

@dugwood commented on July 3rd 2011

That's because it's ClickHeat, not ClickHeat plugin for Piwik. This one is available at: http://www.labsmedia.com/clickheat/piwik/piwik-clickheat.tar.gz

That should be better with this one :-)

@dugwood commented on July 4th 2011

I also think that the installation part didn't run correctly. May be it's possible to send errors, so that the activation of the plugin is impossible, in case some errors happen. I'll check this out. The thing you could have tested: disable then enable the plugin, I think it goes through the installation part again.

@dugwood commented on July 4th 2011

That's okay for the first run. In fact, to improve speed of some scripts, I avoid some tests (does the directory exists? and things like that). But I think there's just an issue with the piwik plugin, as it should not have reached this piece of code (and not run this error then). I'll check on this too, soon. Thanks for your report.

@dugwood commented on September 16th 2011

Thanks ssabchew for the tip. But for me it's not a ClickHeat issue, as long as any software that uses date() will bring the error. I think you're hitting the wrong php.ini, as you seem to set it correctly. See: http://fr.php.net/manual/en/function.date-default-timezone-get.php which clearly states that the date.timezone will be taken out of php.ini, hence there's no way you end up on UTC. Mine is set on "Europe/Paris", under PHP 5.3.3, and I don't see such an error.

@dugwood commented on March 2nd 2012

Hello tjorben,

It's possible. I've not tested it against piwik since the last bug shown here, so 6 months ago. In a (near?) future, Clickheat will be integrated within piwik, so it won't be a patch as it is today.

I'll try to have a look at it next week, but I'm very busy these days :-(

@dugwood commented on June 12th 2012

Sorry, I didn't have much time... neither I do now :-D Anyway, do people with issues find any solution?

@nisiwi: this error is fine, as ClickHeat works in lazy mode: it tries to write in the file, if it goes wrong it then tries to create the directory, then write in the file again. So you should have about 1 warning by group, then nothing.

@clippit commented on October 8th 2012

Hi all,

I have installed this plugin but there is an issue about the javascript that causes lag in browser.

After installed, every click on the webpage will send an XHR and wait at least 500 ms using a dead loop. In /libs/js/clickheat-original.js I found:

/* Little waiting cycle: default is to wait until Ajax sent or until the end of the time if no Ajax is available */
now = new Date();
clickHeatLocalWait = now.getTime() + clickHeatWait;  // clickHeatWait = 500
while (clickHeatLocalWait > now.getTime())
    now = new Date();

I have no idea why it need a wait here which causes obvious delay when clicking in the web page or selecting text. IMHO, it has a bad impact on user experience.

@dugwood commented on November 24th 2012

Hello, I'm sorry I really don't have time to deal with all this. It's been a year, and no time to create a real plugin, with brand new code.

@werter00: you can't mix info from labsmedia with the piwik plugin. If it doesn't work out of the box, that's a real bug, but reading labsmedia.com data won't help you a bit. Or you can install the official ClickHeat and follow labsmedia's info.

@DefconRhall: you can create your own group, so may be you can try something like this should help

clickHeatGroup = document.location.pathname + document.location.search.replace(/\//g, '-');

@clippit: you can disable it, by setting clickHeatWait to 0, IIRC. The idea here was to wait for the Ajax call to be sent, not perfect, but helped in some cases.

@kenhell: you may group pages that are really similar. That's the best way to make the data useful.

@mattab commented on February 6th 2014

Along with the Piwik 2.0 release and new design for Piwik, we have also launched the official Plugins Marketplace to let any developer share their work to the thousands of Piwik users worldwide.

Maybe you'd like to publish your plugin there?

In any case, keep up the good work and we hope you enjoy Piwik 2!

@szepeviktor commented on July 12th 2014

I'd welcome a high code quality heatmap plugin. Maybe the backend based on http://www.patrick-wied.at/static/heatmapjs/

@mattab commented on October 2nd 2014

Thanks everyone for the great discussions here over the years (157 comments!).

Actually it's amazing but this issue is now 6 and a half years old!!!

Now let's continue in the new issue: Heatmap plugin for Piwik #6371

@mattab commented on March 24th 2017

Good news: we're working on Heatmap Analytics for Piwik + scrollmap + click map! It will be awesome and make sure to hear when it's released by signing up here: http://www.heatmap-analytics.com/

This issue was closed on February 6th 2014
Powered by GitHub Issue Mirror