Opened 6 years ago

Closed 2 months ago

Last modified 2 months ago

#73 closed New feature (answered)

Plugin for Click Heatmap

Reported by: matt Owned by: blade106
Priority: normal Milestone:
Component: Plugins Wishlist Keywords: third-party-plugin
Cc: Sensitive: no

Description (last modified by vipsoft)

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

Attachments (8)

piwik-clickheat.tar.gz (140.8 KB) - added by matt 5 years ago.
Heatmap plugin for Piwik
en.php (8.3 KB) - added by ChristianSchneider 4 years ago.
de.php (8.9 KB) - added by ChristianSchneider 4 years ago.
de.2.php (9.3 KB) - added by JanPeters 4 years ago.
Fixed german language for ChristianSchneiders version with htmlenteties
Controller.php (8.4 KB) - added by JanPeters 4 years ago.
Fixed "Missing Constants" Bug by using Piwik_Translate to get the translation from ChristianSchneiders en/de language files
Piwik › Web Analytics Reports_1281992192785.png (17.1 KB) - added by greg 4 years ago.
clickheat-original.js (9.7 KB) - added by luk 4 years ago.
Corrected version of the clickheat.js (you have to minify this again!)
piwik-clickheat-fix-redirect-to-dashboard-bug.patch (664 bytes) - added by stkn 21 months ago.
Patch for Controller.php to fix the redirect to dashboard bug

Download all attachments as: .zip

Change History (168)

comment:1 Changed 6 years ago by matt (mattab)

  • Description modified (diff)

comment:2 Changed 6 years ago by matt (mattab)

  • Owner set to blade106

comment:3 Changed 5 years ago by matt (mattab)

  • Description modified (diff)

comment:4 Changed 5 years ago by matt (mattab)

  • Description modified (diff)

comment:5 Changed 5 years ago by vipsoft (robocoder)

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

comment:6 Changed 5 years ago by matt (mattab)

  • Priority changed from major to critical

Changed 5 years ago by matt (mattab)

Heatmap plugin for Piwik

comment:7 Changed 5 years ago by matt (mattab)

  • Milestone changed from Features requests - after Piwik 1.0 to Third Party Piwik Plugins

comment:8 Changed 5 years ago by matt (mattab)

  • Description modified (diff)

comment:9 Changed 5 years ago by jr-ewing

notice to the Clickheart Integration. In the genereated JavaScript Code is a Link to Labsmedia.

comment:10 Changed 5 years ago by domtop

comment:11 Changed 4 years ago by larsen

I extracted the file into my piwik dir and opened http://piwik.example.com/ClickHeat.php

My apache log shows:
"PHP Fatal error: Class 'Piwik_Plugin' not found in /var/www/vhosts/piwik.example.com/httpdocs/ClickHeat.php on line 12"

Piwik version is 0.4.5

comment:12 Changed 4 years ago by vipsoft (robocoder)

  • Priority changed from critical to normal
  • Sensitive unset

comment:13 Changed 4 years ago by kaystrobach

is there any ongoing development of this tool? -> i like the idea behind it and especially for short term tests click heatmaps are important -> perhaps the overlay mode (like google does) is an opinion, because there is no need to create a grafic.

regards
Kay

comment:14 Changed 4 years ago by jimbo

I second kaystrobach's suggestion! Such a plugin would be very welcome, indeed!

comment:15 Changed 4 years ago by tino

Hi,

great idea to develop such a plugin. I know that the provided tar.gz still is a development version. However I'd like to give early feedback from my first try with piwik-clickheat:

I extracted the current version (either from http://www.labsmedia.com/clickheat/piwik-clickheat.tar.gz or http://dev.piwik.org/trac/attachment/ticket/73/piwik-clickheat.tar.gz) to plugins/ClickHeat and activated it in Piwik. When opening ClickHeat - Heatmap from the menu I get an error page containing 5 warnings:

Warning: Piwik_ClickHeat_Controller::include(/PATH_TO_WWW_DIR/piwik/config/clickheat.php) [<a href='function.Piwik-ClickHeat-Controller-include'>function.Piwik-ClickHeat-Controller-include</a>]: failed to open stream: No such file or directory in PATH_TO_WWW_DIR/piwik/plugins/ClickHeat/Controller.php on line 48

[...]

Warning: Piwik_ClickHeat_Controller::include(plugins/ClickHeat/libs/languages/en.php) [<a href='function.Piwik-ClickHeat-Controller-include'>function.Piwik-ClickHeat-Controller-include</a>]: failed to open stream: No such file or directory in /PATH_TO_WWW_DIR/piwik/plugins/ClickHeat/Controller.php on line 49

[...]

After showing some similiar warnings it finally ends with

Fatal error: Call to a member function read() on a non-object in PATH_TO_WWW_DIR/piwik/plugins/ClickHeat/Controller.php on line 63

Maybe this feedback helps you to locate the problem (if any). Or is there a svn repository or the like where I could get snapshots from nightly builds?

Thanks a lot in advance (I'd really like to give piwik-heatmap a try on my testing system),
Tino

comment:16 Changed 4 years ago by blade106

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

comment:17 Changed 4 years ago by blade106

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?

comment:18 Changed 4 years ago by blade106

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.

comment:19 Changed 4 years ago by tino

Hi,

I tested your fix. The reported errors in lines 48 and 49 disappeared. However it now shows other errors. Hope the following excerpts help!

Warning: Piwik_ClickHeat_Controller::include(/WWWDIR/piwik/config/clickheat.php) [<a href='function.Piwik-ClickHeat-Controller-include'>function.Piwik-ClickHeat-Controller-include</a>]: failed to open stream: No such file or directory in /WWWDIR/piwik/plugins/ClickHeat/Controller.php on line 57
[Backtrace ...]

Warning: Piwik_ClickHeat_Controller::include() [<a href='function.include'>function.include</a>]: Failed opening '/WWWDIR/piwik/config/clickheat.php' for inclusion (include_path='/WWWDIR/piwik/core:/WWWDIR/piwik/libs:/WWWDIR/piwik/plugins') in /WWWDIR/piwik/plugins/ClickHeat/Controller.php on line 57
[Backtrace ...]

Notice: Undefined variable: clickheatConf in /WWWDIR/piwik/plugins/ClickHeat/Controller.php on line 58
[Backtrace ...]

Notice: Undefined index: logPath in /WWWDIR/piwik/plugins/ClickHeat/Controller.php on line 76
[Backtrace ...]

And finally:
Fatal error: Call to a member function read() on a non-object in /WWWDIR/piwik/plugins/ClickHeat/Controller.php on line 77

comment:20 Changed 4 years ago by manne

After following blade106s instruction, this error occurs in Clickheat view

path = "/tmp/cache/clickheat/cache/" is not a directory or is "/"

preview of the website is available, but the height is only set to 20px

comment:21 Changed 4 years ago by blade106

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.

comment:22 Changed 4 years ago by tino

Hi blade106, I followed your instructions and indeed it now doesn't show any errors any longer when opening Heatmap. However I still don't see a Heatmap.

The group dropdown field is empty. The icons layout.png, reload.png and arrow-up.png from plugins/ClickHeat/libs/images aren't displayed at all (no access?). Clicking the links named "Layout refresh" or "Eigene Links speichern" or "Javascript" blanks the ClickHeat page.

Any idea?

comment:23 Changed 4 years ago by blade106

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.

comment:24 Changed 4 years ago by tino

Hi, I managed to resolve the problem (I use piwik 0.5.4. Firefox 3.6).

The png's didn't show up correctly due to wrong access rights: After unzipping the zip file I had to change the access rights for directories and files:
find ClickHeat/ -type d -exec chmod 755 {} +
find ClickHeat/ -type f -exec chmod 644 {} +

Now the frontend shows up correctly!

@manne: I also found the solution for your problem. In piwik/config/clickheat.php you need to change line 3 to

'cachePath' => PIWIK_INCLUDE_PATH.'/tmp/cache/clickheat/cache/',

I will provide more feedback as soon as I tested ClickHeat. Cheers!

comment:25 Changed 4 years ago by blade106

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).

comment:26 Changed 4 years ago by Dominick

I just downloaded the latest version of labsmedia, but i still get this error:

The class Piwik_piwik-clickheat couldn't be found in the file '/----/stats/plugins/piwik-clickheat/piwik-clickheat.php'

comment:27 Changed 4 years ago by blade106

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

comment:28 Changed 4 years ago by kaystrobach

hi,

do i understood correctly, that we need to add some extra js to the htmlsite to enable heatmap tracking?

I thought you add the code via the piwik api into the piwik.php output?
=> that would be perfect ;)

Thanks for your great work.
Best regards
Kay

http://dev.piwik.org/trac/browser/trunk/core/Tracker.php
http://dev.piwik.org/trac/browser/trunk/core/Tracker/Visit.php

comment:29 Changed 4 years ago by blade106

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.

comment:30 Changed 4 years ago by vipsoft (robocoder)

  • Description modified (diff)

comment:31 Changed 4 years ago by vipsoft (robocoder)

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)

comment:32 Changed 4 years ago by blade106

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).

Thanks.

comment:33 Changed 4 years ago by vipsoft (robocoder)

  • Description modified (diff)

comment:34 follow-up: Changed 4 years ago by jimbo

Hi,

installed latest version with Piwik 0.5.4, but I am unable to activate the plug in. While it shows up in the list of plug ins, clicking "Activate" will only reload the same page with no changes. No errors in the log file, either.

Sorry

comment:35 in reply to: ↑ 34 Changed 4 years ago by jimbo

Replying to jimbo:

Ups, now I could activate it, will test it now.

comment:36 Changed 4 years ago by johnol

Hi,

Installed Piwik 0.5.4 and the latest version of piwik-clickheat. Works like a champ for the primary administrator account within Piwik. (Fantastic job on this!)

However, we are having a problem when a standard administrator account logs in to their assigned site within Piwik and try to create clickheat tracking for their site. When they click on clickheat, Piwik loops & loops, refreshing the screen but never loading anything... the looping /refreshing seems to go on for an eternity... we've lost count on how many times it can cycle with no resolution to the request.

Our goal is for all clients to be able to have one or more clickheat maps for each of their sites & to be able to login to their specific Piwik account to see those clickheat maps.

Any idea on why it works for the primary system administrator but not for individual site administrators? It almost behaves like some sort of permissions issue, but for the life of me, I can't figure it out.

comment:37 follow-up: Changed 4 years ago by tino

Hi johnol,

I had the same loop & refresh problem on one of my sites. As far as I remember I had a special character (in my case the letter 'é') in the clickHeatGroup string in the java script code. Removing this special character resolved the problem.

Maybe this helps you,
good luck
Tino

comment:38 in reply to: ↑ 37 Changed 4 years ago by johnol

Replying to tino:

Hi johnol,

I had the same loop & refresh problem on one of my sites. As far as I remember I had a special character (in my case the letter 'é') in the clickHeatGroup string in the java script code. Removing this special character resolved the problem.

Maybe this helps you,
good luck
Tino

Tino, thanks for your help! Forgive my ignorance, but in what java script code? The generated code for a given group? If so, then the only code that has been generated is for the Primary Administrator /Site and that code is clean. If we are talking about a specific file, let me know. Also, -why would the looping occur for all other users but not for the primary administrator? Thanks again!

comment:39 Changed 4 years ago by blade106

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.

comment:40 Changed 4 years ago by blade106

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.

comment:41 Changed 4 years ago by matt (mattab)

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

comment:42 follow-up: Changed 4 years ago by blade106

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)

comment:43 in reply to: ↑ 42 Changed 4 years ago by johnol

Replying to blade106:

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)

Thanks in advance for the help! The *only* user where Clickheat is working properly is the super-user. All other users fail. I have no problem with you accessing the super-user account in order to see what's happening. What Email address should I use?

comment:44 Changed 4 years ago by matt (mattab)

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

comment:45 Changed 4 years ago by svenwbusch

Hi there,
i copied the Folder "ClickHeat" out of the ZIP-File in the "plugins"-Folder on my ftp. But i can´t see the new Plugin in Piwik - have i anything to do?

comment:46 Changed 4 years ago by svenwbusch

Please forget it - i´m such an idiot -_-

It was the Plugins-FOlder of Joomla, not of Piwik...

comment:47 Changed 4 years ago by bthaxor

Hmm how come nothing is showing up for me?

I'm running Piwik 0.5.5, and downloaded ClickHeat from here: http://www.labsmedia.com/clickheat/piwik/piwik-clickheat.tar.gz

I then uploaded the ClickHeat folder to /plugins/, and activated the plugin in the settings page - however when I get back to the 'ClickHeat' page in Piwik, all I get is a blank page with the loading gif. Not even an error...

What's wrong?

comment:48 Changed 4 years ago by johnol

Hi- in addition to the ongoing problem with other users outside of the main user not being able to access heatmaps, I found a configuration problem with Piwik 0.5.5. Specifically the .htaccess file in the plugins folder was creating a "Forbidden" error when a visitor clicks on an item on a page being monitored by clickheat. Because of the Forbidden error, even though the plugin reports that it is installed, none of the actions are recorded. If you disable the .htaccess file in the plugins folder, the clickheat plugin works. This is naturally dangerous and so I'm requesting that a revision be posted for how .htaccess should be configured to safely allow access to the clickheat plugin without giving access to the plugins folder. Thanks!!!

comment:49 follow-up: Changed 4 years ago by vipsoft (robocoder)

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

<Files click.php>
Allow from all
Satisfy any
</Files>

comment:50 in reply to: ↑ 49 Changed 4 years ago by johnol

Replying to vipsoft:

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

<Files click.php>
Allow from all
Satisfy any
</Files>

That worked perfectly. Thanks much!

comment:51 Changed 4 years ago by techeroaleman

Heyho
I just tried to work with the Headmap on Piwik 6.0. By activating it i got a bunch of errors directly in the list of Plugins, so i had to disable it changing the config file. to see the errors:
http://nick.jaussi.eu/error/index.php.html (a copy of the original file).
Apart from that it looks like the Plugin was doing its work i guess. if you need more informations about the problem just send me a mail: techeroaleman@…

Thanks for your work!!!
Nick

comment:52 Changed 4 years ago by blade106

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?

comment:53 Changed 4 years ago by Tomcraft

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

comment:54 follow-up: Changed 4 years ago by 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.

Changed 4 years ago by ChristianSchneider

Changed 4 years ago by ChristianSchneider

comment:55 Changed 4 years ago by Tomcraft

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

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

comment:56 Changed 4 years ago by matt (mattab)

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

comment:57 in reply to: ↑ 54 Changed 4 years ago by Tomcraft

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*

comment:58 Changed 4 years ago by idonomad

Too much errors
Notice: Use of undefined constant LANG_ALL - assumed 'LANG_ALL' in /home6/holidayw/public_html/analytics/plugins/ClickHeat/Controller.php on line 117

Backtrace -->
#0 Piwik_ErrorHandler(8, Use of undefined constant LANG_ALL - assumed 'LANG_ALL', /home6/holidayw/public_html/analytics/plugins/ClickHeat/Controller.php, 117, Array ([groups] => Array ([3] => Array ([0] => <option value="3,acne.cpa">acne.cpa</option>,[1] => <option value="3,callmd">callmd</option>)),[d] => Directory Object ([path] => /home6/holidayw/public_html/analytics/tmp/cache/clickheat/logs/,[handle] => Resource id #116),[dir] => ,[pos] => 1,[site] => 3,[selectGroups] => <optgroup label="CPA- Acne Cream"><option value="3,acne.cpa">acne.cpa</option>
<option value="3,callmd">callmd</option></optgroup>,[options] => Array ([0] => <option value="3,acne.cpa">acne.cpa</option>,[1] => <option value="3,callmd">callmd</option>),[key] => 3,[piwikSite] => Piwik_Site Object ([] => 3),[
selectScreens] => ,[i] => 0)) called at home6/holidayw/public_html/analytics/plugins/ClickHeat/Controller.php:117
#1 Piwik_ClickHeat_Controller->view() called at [(null):0]
#2 call_user_func_array(Array ([0] => Piwik_ClickHeat_Controller Object ([] => ClickHeat,[] => 2010-06-02,[] => Piwik_Date Object ([] => 1275475906,[] => UTC),[] => 3,[] => Piwik_Site Object ([] => 3),[] => Array ([label] => General_ColumnLabel,[nb_visits] => General_ColumnNbVisits,[nb_actions] => General_ColumnNbActions,[max_actions] => General_ColumnMaxActions,[sum_visit_length] => General_ColumnSumVisitLength,[nb_uniq_visitors] => General_ColumnNbUniqVisitors,[nb_actions_per_visit] => General_ColumnActionsPerVisit,[avg_time_on_site] => General_ColumnAvgTimeOnSite,[bounce_rate] => General_ColumnBounceRate,[revenue_per_visit] => General_ColumnValuePerVisit,[goals_conversion_rate] => General_ColumnVisitsWithConversions)),[1] => view), Array ()) called at home6/holidayw/public_html/analytics/core/FrontController.php:126
#3 Piwik_FrontController->dispatch() called at home6/holidayw/public_html/analytics/index.php:59

Notice: Use of undefined constant LANG_ALL - assumed 'LANG_ALL' in /home6/holidayw/public_html/analytics/plugins/ClickHeat/Controller.php on line 124

Backtrace -->
#0 Piwik_ErrorHandler(8, Use of undefined constant LANG_ALL - assumed 'LANG_ALL', /home6/holidayw/public_html/analytics/plugins/ClickHeat/Controller.php, 124, Arra

comment:59 Changed 4 years ago by matt (mattab)

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!

comment:60 Changed 4 years ago by JanPeters

Using: Piwik 0.6.3

Hi there,

here are the fixes for the Language Problem.
Seems like the updated language files from ChristianSchneider needed some follow-up changes in the Controller.php. It was missing the "Piwik_Translate('LANG_xyz')" commands around the former constants.
Furthermore I corrected the german lang file for correct use (as htmlenteties) of the German special chars (Umlaute).

There are still some errors in the ClickHeat/libs/js/admin.js File. Firebug states:

document.getElementById(div) is null
showPanel()
function onmouseover(event) { showPanel(); }(Object { name="event"})
(499 out of range 383)

So someone who's more in the code, should check out the showPanel() function.

Greetings

Jan

Changed 4 years ago by JanPeters

Fixed german language for ChristianSchneiders version with htmlenteties

Changed 4 years ago by JanPeters

Fixed "Missing Constants" Bug by using Piwik_Translate to get the translation from ChristianSchneiders en/de language files

comment:61 Changed 4 years ago by blade106

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.

comment:62 follow-up: Changed 4 years ago by blade106

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)

comment:63 in reply to: ↑ 62 Changed 4 years ago by JanPeters

Replying to blade106:

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)

Hi blade, just tried the updated version you provided yesterday.
Works like a charm and no more js errors.

comment:64 Changed 4 years ago by blade106

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.

comment:65 follow-up: Changed 4 years ago by JanPeters

Found another severe defect with the new version.

ClickHeat is tracking two websites on a per "address" base to get a heatmap for each subpage. Now I've got several users, who shouldn't be allowed to access all sites tracked with Piwik and also ClickHeat.
The ClickHeat Piwik page ist continously reloading if a user hasn't at least "view" rights for each site tracked with ClickHeat.
I tried the following cases to cause the problem with Crome5.0.375 and FF3.6.6:

User has access to one of the pages tracked with ClickHeat: Reload-Loop
User has access to none of the pages tracked with ClickHeat: Reload-Loop
User has (at least) "view" access to ALL of the pages tracked with ClickHeat: No Reload-Loop

Furthermore, when I change the rights for a logged-in user from "No Access" to "View"/"Administrator" for all ClickHeat tracked sites, the heatmap shows up but falls back to a reload-loop stating "Cleaning up" or something like that shortly before reloading. Logout and Login again solves the problem.

I would propose to try to move the site (not subpage) selection from the ClickHeat Panel to the main Piwik site selection, if thats possible in any way. That should circumvent the access-rigths problem which is supposedly causing this.
Might be some work, as I believe it does not match the way ClickHeat works but I'm willing to help you to make the necessary changes, if you want to.

Furthermore I would propose to add a .htaccess file like suggested in #comment:50 to the piwik ClickHeat package to prevent some frustration of first-time-installers with getting 403s when trying to access the click.php file.

comment:66 in reply to: ↑ 65 Changed 4 years ago by JanPeters

Replying to JanPeters:

Furthermore I would propose to add a .htaccess file like suggested in #comment:50 to the piwik ClickHeat package to prevent some frustration of first-time-installers with getting 403s when trying to access the click.php file.

My bad, it's #comment:49.

comment:67 Changed 4 years ago by blade106

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

comment:68 Changed 4 years ago by JanPeters

Ok I see, forgive me for my comment skimming. Don't have much time till end of july, so I skipped some of the older comments. But great to hear thats work in progress!

Code from #comment:49 is fine and working on my installation. But the directory should be /plugins/ClickHeat/libs/ as that is where the click.php is.

comment:69 Changed 4 years ago by blade106

.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).

comment:70 Changed 4 years ago by Khabaal

First of all, great plugin, i just installed it inside my piwik 0.6.4 installation. The only thing i am missing is that it seems not to be possible to see the clicks on every single site of my domain.
If i click on the "ClickHeat" button inside Piwik i get a nice view of my frontsite together with the spots where ppl click.
But your script is executed on every single page on my homepage and it seems that all the places where ppl click will be displayed with my frontpage as background. So i would like to ask, is this true and will there be a feature to click into the subpages as we know it from other click-overlay tools or do i have to use unique scripts on every page i would like to track the clicks on?

comment:71 Changed 4 years ago by blade106

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.

comment:72 in reply to: ↑ description Changed 4 years ago by iulianf

Replying to matt:

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

There is a problem with piwik version 0.9.
Seems that some constants are already declared.

comment:73 Changed 4 years ago by blade106

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

comment:74 Changed 4 years ago by blade106

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...

comment:75 Changed 4 years ago by vipsoft (robocoder)

init()? did you mean install()?

comment:76 Changed 4 years ago by blade106

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.

comment:77 Changed 4 years ago by vipsoft (robocoder)

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.

comment:78 Changed 4 years ago by blade106

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.

comment:79 Changed 4 years ago by iulianf

Now it works fine for piwik 0.9.
Thanks!

comment:80 Changed 4 years ago by ChristianSchneider

I can't add a new entry for clickheat, because submit is not working.

Adding a group name and clicking "Enter" doesn't work for me.

comment:81 Changed 4 years ago by blade106

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?

comment:82 Changed 4 years ago by ChristianSchneider

Sorry, was my fault... Did not understand that it was enough to add the javascript to the page that was tracked. Sorry...

comment:83 follow-up: Changed 4 years ago by Tomcraft

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

comment:84 in reply to: ↑ 83 Changed 4 years ago by Tomcraft

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.

comment:85 Changed 4 years ago by matt (mattab)

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

comment:86 Changed 4 years ago by JanPeters

Piwik 0.9 with actual ClickHeat DEV Release works fine. Theres still a warning with a $config String or so, but works fine and as it should! I could post the error tomorrow if you wish blade.

comment:87 Changed 4 years ago by greg (gka)

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 "/".

comment:88 Changed 4 years ago by blade106

@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.

comment:89 Changed 4 years ago by greg (gka)

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?

comment:90 follow-up: Changed 4 years ago by kowalikus

If anybody had problem with no superuser access You may add these line in ClickHeat controller

	/**
	 * Main method
	 */
	function view()
	{
		$this->init();
    
     //this line is added by Kowalikus to get the list of sites where the current user has view access
    $siteWithViewAccess = Zend_Registry::get('access')->getSitesIdWithAtLeastViewAccess();

		/** List of available groups */
		$groups = array();
		$d = dir(self::$conf['logPath']);
		while (($dir = $d->read()) !== false)
		{
			if ($dir[0] === '.' || !is_dir($d->path.$dir)) continue;
			$pos = strpos($dir, ',');

      
			if ($pos !== false)
			{
				$site = substr($dir, 0, $pos);
        
//this 3 line is added by Kowalikus to check if current user has view access, if  not the iteration of loop will be aborted
        if(!in_array($site, $siteWithViewAccess))
        {
          continue;
        }
        
			}
			else
			{
				$site = '';


In Piwik 0.9 I had problem with constants that were declared few times. (many calls of method init())

so i added static property 'initialized' and setting up 'false';
if self::$initialized property has 'true' the function return something to avoid define constants more times

//added by Kowalikus
	static $initialized = false;		

	function init()
	{

//added by Kowalikus
		if(self::$initialized)
		{
			return 0;
		}


		$__languages = array('bg', 'cz', 'de', 'en', 'es', 'fr', 'hu', 'id', 'it', 'ja', 'nl', 'pl', 'pt', 'ro', 'ru', 'sr', 'tr', 'uk', 'zh');

		if (isset($_SERVER['REQUEST_URI']) && $_SERVER['REQUEST_URI'] !== '')
		{
			$realPath = &$_SERVER['REQUEST_URI'];
		}
		elseif (isset($_SERVER['SCRIPT_NAME']) && $_SERVER['SCRIPT_NAME'] !== '')
		{
			$realPath = &$_SERVER['SCRIPT_NAME'];
		}
		else
		{
			exit(LANG_UNKNOWN_DIR);
		}

		/** First of all, check if we are inside Piwik */
		$dirName = dirname($realPath);
		if ($dirName === '/')
		{
			$dirName = '';
		}

		define('CLICKHEAT_PATH', $dirName.'/plugins/ClickHeat/libs/');
		define('CLICKHEAT_INDEX_PATH', 'index.php?module=ClickHeat&');
		define('CLICKHEAT_ROOT', PIWIK_INCLUDE_PATH.'/plugins/ClickHeat/libs/');
		define('CLICKHEAT_CONFIG', PIWIK_INCLUDE_PATH.'/config/clickheat.php');
		define('IS_PIWIK_MODULE', true);

		if (Zend_Registry::get('access')->isSuperUser())
		{
			define('CLICKHEAT_ADMIN', true);
		}
		else
		{
			define('CLICKHEAT_ADMIN', false);
		}

		define('CLICKHEAT_LANGUAGE', Piwik_Translate::getInstance()->getLanguageToLoad());
		include (CLICKHEAT_CONFIG);
		self::$conf = $clickheatConf;
		/** For use in external files */
		$GLOBALS['clickheatConf'] = &self::$conf;

		/** Specific definitions */
		self::$conf['__screenSizes'] = array(0 /** Must start with 0 */, 640, 800, 1024, 1280, 1440, 1600, 1800);
		self::$conf['__browsersList'] = array('all' => '', 'firefox' => 'Firefox', 'msie' => 'Internet Explorer', 'safari' => 'Safari', 'opera' => 'Opera', 'kmeleon' => 'K-meleon', 'unknown' => '');

//added by Kowalikus
		self::$initialized = true;
	}

comment:91 in reply to: ↑ 90 Changed 4 years ago by kowalikus

Replying to kowalikus:

If anybody had problem with no superuser access You may add these line in ClickHeat controller

Problem is loop reccurency if user is not an admin

comment:92 Changed 4 years ago by kowalikus

I've installed script on my site Ageno

The main content is centered I should setting up width of main content somwhere in config?

ClickHeat will know that my site is centered? What about different resolutions of screen?

can I edit my posts, I don't want flooding :)

Piwik + ClickHeat is Great!

comment:93 Changed 4 years ago by blade106

@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.

comment:94 Changed 4 years ago by blade106

@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.

Changed 4 years ago by luk

Corrected version of the clickheat.js (you have to minify this again!)

comment:95 Changed 4 years ago by luk

Hi,

just registered here and also use piwik for the first time (installed yesterday), so I'm kinda noob =)...forgive me if I write some b*shit...

I like the piwik idea very much and for sure I want to help where I can...

So I found your Clickheat Plugin and installed it right away =), works great (I use piwik v1.0), I just had a Javascript error which stopped every other js in IE7 (as usual, and also in Firefox w/ Firebug), it said something about a bad regex, so I visited jslint and checked the code of the /plugins/ClickHeat/libs/js/clickheat-original.js File, jslint had a huge list of things which are not "right" in it's view, but I found the regex thing, it was on line 213 which said: domain = window.location.href.match(/http:\/\/[/]+\); and there was also the unescaped forward slash, so I corrected it to domain = window.location.href.match(/http:\/\/[\/]+\); and now it doesn't throw errors anymore.

I also corrected everything else jslint had to beef about =)...so here it is:

/**
ClickHeat : Suivi et analyse des clics / Tracking and clicks analysis

@author Yvan Taviaud - LabsMedia - www.labsmedia.com/clickheat/
@since 27/10/2006
@update 01/03/2007 - Yvan Taviaud : correctif Firefox (Károly Marton)
@update 23/03/2007 - Yvan Taviaud : protection de 2 secondes entre chaque clic, et X clics maximum par page
@update 18/05/2007 - Yvan Taviaud : suppression de clickHeatPage, ajout de clickHeatGroup et clickHeatSite
@update 27/08/2007 - Yvan Taviaud : changement du système de débug
@update 28/09/2007 - Yvan Taviaud : ajout de quelques messages de débug
@update 16/03/2008 - Yvan Taviaud : utilisation des Listeners - ajout d'un délai pour enregistrer le clic correctement - correctif JSLint
@update 05/07/2010 - Yvan Taviaud : ajout de Chrome, ajout du test non-Ajax pour libérer le clic plus rapidement
@update 13/08/2010 - Yvan Taviaud : gestion de IE 8 qui posait des soucis sur l'event

Tested under :
Windows 2000 - IE 6.0
Linux - Firefox 2.0.0.1, Konqueror 3.5.5, IE 7
*/

/** Main variables */
var clickHeatGroup = '';
var clickHeatSite = '';
var clickHeatServer = '';
var clickHeatLastIframe = -1;
var clickHeatTime = 0;
var clickHeatQuota = -1;
var clickHeatBrowser = '';
var clickHeatDocument = '';
var clickHeatWait = 500;
var clickHeatLocalWait = 0;
var clickHeatDebug = (window.location.href.search(/debugclickheat/) != -1);

/**
* Shows a debug string
**/
function showClickHeatDebug(str)
{
	if (clickHeatDebug === true)
	{
		document.getElementById('clickHeatDebuggerSpan').innerHTML = str;
		document.getElementById('clickHeatDebuggerDiv').style.display = 'block';
	}
}

/** Main function */
function catchClickHeat(e)
{
	/** Use a try{} to avoid showing errors to users */
	try
	{
		showClickHeatDebug('Gathering click data...');
		if (clickHeatQuota === 0)
		{
			showClickHeatDebug('Click not logged: quota reached');
			return true;
		}
		if (clickHeatGroup === '')
		{
			showClickHeatDebug('Click not logged: group name empty (clickHeatGroup)');
			return true;
		}
		/** Look for the real event */
		if (e === undefined)
		{
			e = window.event;
		}
		c = e.which || e.button;
		element = e.srcElement || null;
		if (c === 0)
		{
			showClickHeatDebug('Click not logged: no button pressed');
			return true;
		}
		/** Filter for same iframe (focus on iframe => popup ad => close ad => new focus on same iframe) */
		if (element !== null && element.tagName.toLowerCase() == 'iframe')
		{
			if (element.sourceIndex == clickHeatLastIframe)
			{
				showClickHeatDebug('Click not logged: same iframe (a click on iframe opens a popup and popup is closed => iframe gets the focus again)');
				return true;
			}
			clickHeatLastIframe = element.sourceIndex;
		}
		else
		{
			clickHeatLastIframe = -1;
		}
		var x = e.clientX;
		var y = e.clientY;
		var w = clickHeatDocument.clientWidth !== undefined ? clickHeatDocument.clientWidth : window.innerWidth;
		var h = clickHeatDocument.clientHeight !== undefined ? clickHeatDocument.clientHeight : window.innerHeight;
		var scrollx = window.pageXOffset === undefined ? clickHeatDocument.scrollLeft : window.pageXOffset;
		var scrolly = window.pageYOffset === undefined ? clickHeatDocument.scrollTop : window.pageYOffset;
		/** Is the click in the viewing area? Not on scrollbars. The problem still exists for FF on the horizontal scrollbar */
		if (x > w || y > h)
		{
			showClickHeatDebug('Click not logged: out of document (should be a click on scrollbars)');
			return true;
		}
		/** Check if last click was at least 1 second ago */
		clickTime = new Date();
		if (clickTime.getTime() - clickHeatTime < 1000)
		{
			showClickHeatDebug('Click not logged: at least 1 second between clicks');
			return true;
		}
		clickHeatTime = clickTime.getTime();
		if (clickHeatQuota > 0)
		{
			clickHeatQuota = clickHeatQuota - 1;
		}
		params = 's=' + clickHeatSite + '&g=' + clickHeatGroup + '&x=' + (x + scrollx) + '&y=' + (y + scrolly) + '&w=' + w + '&b=' + clickHeatBrowser + '&c=' + c + '&random=' + Date();
		showClickHeatDebug('Ready to send click data...');
		/** Local request? Try an ajax call */
		var sent = false;
		if (clickHeatServer.substring(0, 4) != 'http')
		{
			var xmlhttp = false;
			try
			{
				xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
			}
			catch (er)
			{
				try
				{
					xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
				}
				catch (oc)
				{
					xmlhttp = null;
				}
			}
			if (!xmlhttp && typeof XMLHttpRequest !== undefined)
			{
				xmlhttp = new XMLHttpRequest();
			}
			if (xmlhttp)
			{
				if (clickHeatDebug === true)
				{
					xmlhttp.onreadystatechange = function()
					{
						if (xmlhttp.readyState == 4)
						{
							if (xmlhttp.status == 200)
							{
								showClickHeatDebug('Click recorded at ' + clickHeatServer + ' with the following parameters:<br/>x = ' + (x + scrollx) + ' (' + x + 'px from left + ' + scrollx + 'px of horizontal scrolling)<br/>y = ' + (y + scrolly) + ' (' + y + 'px from top + ' + scrolly + 'px of vertical scrolling)<br/>width = ' + w + '<br/>browser = ' + clickHeatBrowser + '<br/>click = ' + c + '<br/>site = ' + clickHeatSite + '<br/>group = ' + clickHeatGroup + '<br/><br/>Server answer: ' + xmlhttp.responseText);
							}
							else if (xmlhttp.status == 404)
							{
								showClickHeatDebug('click.php was not found at: ' + (clickHeatServer !== '' ? clickHeatServer : '/clickheat/click.php') + ' please set clickHeatServer value');
							}
							else
							{
								showClickHeatDebug('click.php returned a status code ' + xmlhttp.status + ' with the following error: ' + xmlhttp.responseText);
							}
							/** Stop waiting */
							clickHeatLocalWait = 0;
						}
					};
				}
				xmlhttp.open('GET', clickHeatServer + '?' + params, true);
				xmlhttp.setRequestHeader('Connection', 'close');
				xmlhttp.send(null);
				sent = true;
			}
		}
		if (sent === false)
		{
			/** This test is needed, as it includes the call to click.php in the iframe */
			if (clickHeatDebug === true)
			{
				showClickHeatDebug('Click recorded at ' + clickHeatServer + ' with the following parameters:<br/>x = ' + (x + scrollx) + ' (' + x + 'px from left + ' + scrollx + 'px of horizontal scrolling)<br/>y = ' + (y + scrolly) + ' (' + y + 'px from top + ' + scrolly + 'px of vertical scrolling)<br/>width = ' + w + '<br/>browser = ' + clickHeatBrowser + '<br/>click = ' + c + '<br/>site = ' + clickHeatSite + '<br/>group = ' + clickHeatGroup + '<br/><br/>Server answer:<br/>' + '<iframe src="' + clickHeatServer + '?' + params + '" width="700" height="60"></iframe>');
			}
			else
			{
				var clickHeatImg = new Image();
				clickHeatImg.src = clickHeatServer + '?' + params;
				//			clickHeatImg.onload = function() { clickHeatLocalWait = 0; }
			}
		}
		/** Little waiting cycle: default is to wait until Ajax sent or until the end of the time if no Ajax is available */
		var now = new Date();
		clickHeatLocalWait = now.getTime() + clickHeatWait;
		while (clickHeatLocalWait > now.getTime())
		{
			now = new Date();
		}
	}
	catch(err)
	{
		showClickHeatDebug('An error occurred while processing click (Javascript error): ' + err.message);
	}
	return true;
}

function initClickHeat()
{
	/** Debug Window */
	if (clickHeatDebug === true)
	{
		document.write('<div id="clickHeatDebuggerDiv" style="padding:5px; display:none; position:absolute; top:200px; left:200px; border:1px solid #888; background-color:#eee; z-index:99;"><strong>ClickHeat debug: <a href="#" onmouseover="document.getElementById(\'clickHeatDebuggerDiv\').style.display = \'none\'; return false">Rollover to close</a></strong><br/><br/><span id="clickHeatDebuggerSpan"></span></div>');
	}

	if (clickHeatGroup === '' || clickHeatServer === '')
	{
		showClickHeatDebug('ClickHeat NOT initialised: either clickHeatGroup or clickHeatServer is empty');
		return false;
	}

	/** If current website has the same domain as the script, we remove the domain so that the call is made using Ajax */
	domain = window.location.href.match(/http:\/\/[^\/]+\//);
	if (domain !== null && clickHeatServer.substring(0, domain[0].length) == domain[0])
	{
		clickHeatServer = clickHeatServer.substring(domain[0].length - 1, clickHeatServer.length);
	}
	/** Add onmousedown event using listeners */
	if (document.addEventListener)
	{
		document.addEventListener('mousedown', catchClickHeat, false);
	}
	else if (document.attachEvent)
	{
		document.attachEvent('onmousedown', catchClickHeat);
	}
	/** Add onfocus event on iframes (mostly ads) - Does NOT work with Gecko-powered browsers, because onfocus doesn't exist on iframes */
	iFrames = document.getElementsByTagName('iframe');
	for (var i = 0; i < iFrames.length; i++)
	{
		if (document.addEventListener)
		{
			iFrames[i].addEventListener('focus', catchClickHeat, false);
		}
		else if (document.attachEvent)
		{
			iFrames[i].attachEvent('onfocus', catchClickHeat);
		}
	}
	/** Preparing main variables */
	clickHeatDocument = (document.documentElement !== undefined && document.documentElement.clientHeight !== 0) ? document.documentElement : document.body;
	/** Also the User-Agent is not the best value to use, it's the only one that gives the real browser */
	var b = navigator.userAgent !== undefined ? navigator.userAgent.toLowerCase().replace(/-/g, '') : '';
	/** Always test Chrome before Safari */
	var browsers = ['chrome', 'firefox', 'safari', 'msie', 'opera'];
	clickHeatBrowser = 'unknown';
	for (var j = 0; j < browsers.length; j++)
	{
		if (b.indexOf(browsers[j]) != -1)
		{
			clickHeatBrowser = browsers[j];
			break;
		}
	}
	showClickHeatDebug('ClickHeat initialised with:<br/>site = ' + clickHeatSite + '<br/>group = ' + clickHeatGroup + '<br/>server = ' + clickHeatServer + '<br/>quota = ' + (clickHeatQuota == -1 ? 'unlimited' : clickHeatQuota) + '<br/><br/>browser = ' + clickHeatBrowser + '<br/><strong>Click in a blank area (not on a link) to test ClickHeat</strong>');
}

hope this is a helpful little contribution...

comment:96 follow-up: Changed 4 years ago by halfdan

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.

comment:97 in reply to: ↑ 96 Changed 4 years ago by luk

Replying to halfdan:

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.

I read through the link above, I skipped obviously the first steps with opening a ticket and so on...it's not really a big fix, just a little correction, so this would be a little overkill, wouldn't it? What I did is attach the file to this ticket (at the top of this "ticket/thread"...)

comment:98 Changed 4 years ago by blade106

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

comment:99 Changed 4 years ago by blade106

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.

comment:100 Changed 4 years ago by luk

ok, I didn't know that the === thing is breaking the JS...it seems to work as expected in piwik (I got a heatmap for every page which is nice =D, not soooo many clicks yet, but for a page that isn't launched, nice!), what would this break in which browsers? I'm just interested because I do comparing in JS always with the === and I think I have not recognized problems because of that...

It's also no problem to just fix the regex-issue and leave the rest alone, the error in IE is gone =)...

And to make JSLint happy, I don't know, this thing is never happy =P...

comment:101 Changed 4 years ago by blade106

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 :-)

comment:102 follow-up: Changed 4 years ago by blade106

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

comment:103 in reply to: ↑ 102 Changed 4 years ago by brandonkernell

Replying to blade106:

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

I have tested this running Piwik 1.0. I see no problems and it is reporting just fine, but it only started reporting after I did the test (using ?debugclickheat) and now it tracks just fine.

It seems to know when I have blacklisted an IP and all of that. Good work. I will check back here for updates.

One thing, the image needs to align with the current page.

comment:104 follow-up: Changed 4 years ago by blade106

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?»).

comment:105 in reply to: ↑ 104 Changed 4 years ago by brandonkernell

Replying to blade106:

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?»).

Yea its called "Log my clicks?". All in all it should be ported in with the IP address block of piwik itself, that way there is no confusion.

Also, as to the image:
http://img842.imageshack.us/img842/5880/clickheatimageresize.th.png

I also noticed, even though you are on a certain profile (site) you still have to select what group you want, is there not a way to make it so that it knows what group or by reading the website URL?

comment:107 Changed 3 years ago by blade106

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 :-)

comment:108 Changed 3 years ago by ste_piwik

Hi all,

as I run Clickheat now for several weeks within Piwik, I discovered that it only and always shows the clicks of just 1 day.

No matter what I change it still brings up the Heatmap for 1 day. I changed the config file 'start'=>'d' to 'start'=>'m' without any changes (both of the config files, as I don't know which one will be the right one).

I even changed the $range variable in the Controller file from 'd' to 'm' without any effect.
It would be great if that could be changed soon, as it not really useful this way.

BTW I run the Clickheat-Plugin where the files are created Sept.1, 2010. Hopefully that helps, as there is no version number.

Hope this information helps to better include Clickheat into Piwik.

comment:109 Changed 3 years ago by blade106

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.

comment:110 follow-up: Changed 3 years ago by blade106

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.

comment:111 Changed 3 years ago by luk

Just read this and I'm interested in trying it out =)...only which link "above" do you mean? The DEV version link here: http://www.labsmedia.com/clickheat/piwik/piwik-clickheat.tar.gz ??

thanks for the fix!

comment:112 Changed 3 years ago by blade106

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.

comment:113 in reply to: ↑ 110 Changed 3 years ago by ste_piwik

Replying to blade106:

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.

That worked for me as well! Great Work, awesome! Thanks a lot for the Plugin.

comment:114 Changed 3 years ago by tyroden

I have successfully installed ClickHeat, and the heat maps work fine (once I setup the .htaccess change for click.php all went well).

I have several websites within my Piwik configuration, and no matter what site I choose, I always see the heatmap from the original site. How do I make sure that the heatmp only shows within the proper site?

Great plugin by the way!

comment:115 Changed 3 years ago by Nikita

I'm currently trying to install ClickHeat for piwk 1.2
Piwik has recognized it as plugin and I was able to enable it. But the only thing I can see is the empty ClickHeat window http://img860.imageshack.us/f/clickheat.jpg/. Am I doing something wrong with the installation or it's a piwik 1.2 issue?

comment:116 follow-up: Changed 3 years ago by blade106

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 :-)

comment:117 Changed 3 years ago by morefx

I found an issue with Piwik 1.3 using when opening the ClickHeat tab:

Fatal error: Call to a member function read() on a non-object in 
/www/vhosts/piwik.foobar.com/htdocs/piwik/plugins/ClickHeat/Controller.php 
on line 89

Warning: dir() [<a href='function.dir'>function.dir</a>]: 
SAFE MODE Restriction in effect. The script whose uid is 10097 is not allowed to access 
/www/vhosts/piwik.foobar.com/htdocs/piwik/tmp/cache/clickheat/logs/ 
owned by uid 58 in 
/www/vhosts/piwik.foobar.com/htdocs/piwik/piwik/plugins/ClickHeat/Controller.php 
on line 84


System info:

  • Apache with mod_php (PHP 5.2.10)
  • safe_mod enabled
  • Piwik 1.3
  • CleckHeat 1.9-revB

I'll be happy to test patches or new versions of ClickHeat.

comment:118 Changed 3 years ago by blade106

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).

comment:119 Changed 3 years ago by morefx

Switched to FastCGI instead of mod_php for the time being. Works just fine!

comment:120 Changed 3 years ago by blade106

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

comment:121 in reply to: ↑ 116 Changed 3 years ago by motin

Replying to blade106:

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 :-)

Having the same issue in piwik 1.4 as Nikita. It seems the plugin is broken in versions 1.2+. Any chance you have time to look into it now when end of April has passed? :)

I am getting a 403 error on including the javascript file - /plugins/ClickHeat/libs/js/admin.js

comment:122 Changed 3 years ago by motin

Replying to myself. The issue was permissions (as it very often is... :P)

After extracting the plugin folder, the permissions on the ClickHeat folder was

drwx------ 5 user user   4096 Nov 30 08:03 ClickHeat

Which prevented any access for the apache user to access the contents.

chmod g+rwx -R ClickHeat/

Solved the issue... Now the plugin tab is functional again.

comment:123 Changed 3 years ago by motin

One more thing to get it going:

Create a file named '.htaccess' in ClickHeat/libs/ with the following contents:

<Files ~ "\.(inc|tpl|in)$">
Deny from all
</Files>
<Files ~ "\.(test\.php|gif|ico|jpg|png|js|css|swf|php)$">
Satisfy any
Allow from all
</Files>

Otherwise your click tracking php script will be blocked by piwik's own .htaccess file in the plugins folder.

Now ClickHeat works beautifully in Piwik 1.4! :)

comment:124 Changed 3 years ago by blade106

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!)

comment:125 Changed 3 years ago by blade106

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.

comment:126 Changed 3 years ago by vipsoft (robocoder)

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.

comment:127 Changed 3 years ago by blade106

.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
</Files>

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.

comment:128 Changed 3 years ago by opensourcer

Just tried installing the plugin, but got the following error:

Unable to load plugin 'clickheat' because '/---/public_html/piwik/plugins/clickheat/clickheat.php' couldn't be found.

Renaming click.php to clickheat.php (naturally) only threw up even more errors...

comment:129 Changed 3 years ago by blade106

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.

comment:130 Changed 3 years ago by opensourcer

Thanks for your fast answer. The file at http://sourceforge.net/projects/clickheat/files/clickheat/clickheat-1.14.zip/download has the directory with a lower-case "c."

However, even after renaming to capital C, Piwik still gives me the error above as it expects a "clickheat.php" file, which is not present in your zip file.

comment:131 Changed 3 years ago by blade106

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 :-)

comment:132 Changed 3 years ago by morefx

I tried the version above with Piwik 1.5. After activating the plug-in and clicking on the ClickHeat tab, I get the following errors/warnings:

Warning: include() [<a href='function.include'>function.include</a>]: Unable to access /var/www/vhosts/piwik.foobar.de/httpdocs/piwik/config/clickheat.php in /var/www/vhosts/piwik.foobar.de/httpdocs/piwik/plugins/ClickHeat/Controller.php on line 55 
Warning: include(/var/www/vhosts/piwik.foobar.de/httpdocs/piwik/config/clickheat.php) [<a href='function.include'>function.include</a>]: failed to open stream: Datei oder Verzeichnis nicht gefunden in /var/www/vhosts/piwik.foobar.de/httpdocs/piwik/plugins/ClickHeat/Controller.php on line 55 
Warning: include() [<a href='function.include'>function.include</a>]: Failed opening '/var/www/vhosts/piwik.foobar.de/httpdocs/piwik/config/clickheat.php' for inclusion (include_path='.:') in /var/www/vhosts/piwik.foobar.de/httpdocs/piwik/plugins/ClickHeat/Controller.php on line 55 
Notice: Undefined index: logPath in /var/www/vhosts/piwik.foobar.de/httpdocs/piwik/plugins/ClickHeat/Controller.php on line 85


There is no /var/www/vhosts/piwik.cm-applications.de/httpdocs/piwik/config/clickheat.php Copying an old version of config/clickheat.php to the needed locations gets rid of two of the mentioned errors, three left:

Warning: dir() [<a href='function.dir'>function.dir</a>]: Unable to access /var/www/vhosts/piwik.foobar.de/httpdocs/piwik/tmp/cache/clickheat/logs/ in /var/www/vhosts/piwik.foobar.de/httpdocs/piwik/plugins/ClickHeat/Controller.php on line 85 
Warning: dir(/var/www/vhosts/piwik.foobar.de/httpdocs/piwik/tmp/cache/clickheat/logs/) [<a href='function.dir'>function.dir</a>]: failed to open dir: Datei oder Verzeichnis nicht gefunden in /var/www/vhosts/piwik.foobar.de/httpdocs/piwik/plugins/ClickHeat/Controller.php on line 85 
Fatal error: Call to a member function read() on a non-object in /var/www/vhosts/piwik.foobar.de/httpdocs/piwik/plugins/ClickHeat/Controller.php on line 94

Steps to reproduce:

  1. Download and unpack

http://www.labsmedia.com/clickheat/piwik/piwik-clickheat.tar.gz
to the piwik-plugin directory

  1. adjust owner and permissions according to server needs
  2. activate plug-in in piwik 1.5
  3. click on ClickHeat tab

comment:133 Changed 3 years ago by opensourcer

@blade106: Thanks, that explains and solved it :-)

@morefx: Cannot reproduce your errors. Following your steps works fine for me.

comment:134 Changed 3 years ago by morefx

I had to do some steps manually, which obviously should happen during installation:

  • mkdir httpdocs/piwik/tmp/cache/clickheat
  • mkdir httpdocs/piwik/tmp/cache/clickheat/logs
  • mkdir httpdocs/piwik/tmp/cache/clickheat/cache
  • create httpdocs/piwik/config/clickheat.php (copy of an old clickheat.php which I happened to have on my server)

Might be a permission problem during installation? I don't see any errors/warnings however.

I'll be happy to do further tests.

comment:135 Changed 3 years ago by blade106

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.

comment:136 Changed 3 years ago by morefx

I did

  • Uninstall the plugin within Piwik
  • Removed the httpdocs/piwik/tmp/cache/ directory
  • Activated the plugin again within Piwik
  • Clicked on the ClickHeat tab in Piwik

-> Error:

Warning: dir() [<a href='function.dir'>function.dir</a>]: Unable to access /var/www/vhosts/piwik.foobar.de/httpdocs/piwik/tmp/cache/clickheat/logs/ in /var/www/vhosts/piwik.foobar.de/httpdocs/piwik/plugins/ClickHeat/Controller.php on line 85 

Warning: dir(/var/www/vhosts/piwik.foobar.de/httpdocs/piwik/tmp/cache/clickheat/logs/) [<a href='function.dir'>function.dir</a>]: failed to open dir: Datei oder Verzeichnis nicht gefunden in /var/www/vhosts/piwik.foobar.de/httpdocs/piwik/plugins/ClickHeat/Controller.php on line 85


The Apache error log does not show a problem during installation, but when clicking on the ClickHeat tab, I get

[Mon Jul 04 09:28:31 2011] [warn] mod_fcgid: stderr: PHP Fatal error:  Call to a member function read() on a non-object in /var/www/vhosts/piwik.foobar.de/httpdocs/piwik/plugins/ClickHeat/Controller.php on line 94

For the record: I am running php as fastcgi as you suggested earlier

comment:137 Changed 3 years ago by blade106

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.

comment:138 Changed 3 years ago by ssabchew

I have installed the dev version on COS6 in piwik 1.5.1 and I have this err in httpd on every record:

PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'UTC' for 'UTC/0.0/no DST' instead in /var/www/piwik/plugins/ClickHeat/libs/click.php on line 97

from php.ini:

date.timezone = "Europe/London"

comment:139 Changed 3 years ago by ssabchew

added before line 97

date_default_timezone_set('UTC');

and no more error/warnings

--- click.php<->2011-08-10 20:31:29.000000000 +0000
+++ plugins/ClickHeat/libs/click.php<-->2011-08-10 19:49:03.000000000 +0000
@@ -94,7 +94,6 @@
 <----->}
 }
 /* Logging the click */
-date_default_timezone_set('UTC');
 $f = fopen($clickheatConf['logPath'].$final.'/'.date('Y-m-d').'.log', 'a');
 if (!is_resource($f))
 {

comment:140 Changed 3 years ago by blade106

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.

comment:141 follow-up: Changed 2 years ago by tjorben

Hi,

could it be that piwik 1.7 is not working with the latest clickheat? I installed the plugin and activated it. When im clicking on the tab heatmap the plugin screen will show up very fast and then i jump back to the dashboard. Does anybody know if i can fix it or where is my problem?

What is about the developement? Is there coming a new version soon?

thanks and bye

comment:142 Changed 2 years ago by blade106

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 :-(

comment:143 Changed 2 years ago by bizonek

Hi

It will be great to see this plugin back to working again and integrated with piwik permanently.

comment:144 follow-up: Changed 2 years ago by jordanskole

Hey all

I just got started experimenting with piwik yesterday, so I'll do what I can, but as far as clickheat goes I got the plugin turned on, and the same error screen.

The errer says

"No logs for the selected period (first think removing filters: browser, screensize). Did you correctly installed javascript code on your webpages?"

I'll give it a shot trying to debug it, but like I said I just got stared with piwik yesterday!

comment:145 in reply to: ↑ 144 Changed 2 years ago by lilbiscuit

Did you install the Clickheat JS snippet on your page(s)? I just installed plugin and then installed the JS snippet, and Clickheat appears to be functioning properly.

-lb

comment:146 Changed 22 months ago by nisiwi

I'm seeing the following error while testing clickheat with ?debugclickheat;

Warning: fopen(/home/xxxxxx/public_html/piwik/tmp/cache/clickheat/logs/5,mygroupname/2012-06-11.log) [function.fopen]: failed to open stream: No such file or directory in /home/xxxxxx/public_html/piwik/plugins/ClickHeat/libs/click.php on line 97
OK, but click not logged as you prevent this IP to be tracked in Piwik's configuration

comment:147 Changed 22 months ago by blade106

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.

comment:148 in reply to: ↑ 141 Changed 22 months ago by aivokoger

Replying to tjorben:

Hi,

could it be that piwik 1.7 is not working with the latest clickheat? I installed the plugin and activated it. When im clicking on the tab heatmap the plugin screen will show up very fast and then i jump back to the dashboard. Does anybody know if i can fix it or where is my problem?

What is about the developement? Is there coming a new version soon?

thanks and bye

I have the same issue. Most functionality works, but with no or small amount of click data it redirects to main dashboard of the default site. It's really annoying. Anyone knows a solution or hack for the redirection bug?
I'm using ClickHeat per URL, not grouped pages. I think it wouldn't be a problem, if I would have only one or two groups per site.

comment:149 follow-up: Changed 21 months ago by bugmenot

Hello all

I have a Problem:

I use: Piwik 1.8.2 with ClickHeat: 1.9-revB Piwik Plugin

it works very good but it wont display the background of my Webseite:

http://www.imgbox.de/show/img/4nYLEwscza.png

what is wrong with my Config?

comment:150 Changed 21 months ago by xiaotianhu

I install ClickHeat for piwik,everything works well except in chrome&safari
when u open the page by these two browser,the page gets loop refresh,but everything is ok in IE/FireFox
so I guess it may have problems with the webtik.

Tip:you can add an alert() function at the end of the view.tpl or in admin.js.U just need to pop an alert in chrome ,then it will works.But it still fault in Safari.Any one Know how to solve it ?

comment:151 in reply to: ↑ 149 ; follow-up: Changed 21 months ago by xiaotianhu

Replying to bugmenot:

Hello all

I have a Problem:

I use: Piwik 1.8.2 with ClickHeat: 1.9-revB Piwik Plugin

it works very good but it wont display the background of my Webseite:

http://www.imgbox.de/show/img/4nYLEwscza.png

what is wrong with my Config?

First,you should see if the iframe's src is correct,just use chrome's developer tools to see.
The Iframe's src was set empty as init,then changed by the function in Plugins/Clickheat/lib/js/admin.js
loadIframe(),it generates an ajax request to the Controller in Plugins/Clickheat/Controller.php with the function iframe()
it loads the url from the file in tmp/cache/clickheat/logs/siteid,groupname/url.txt
just see if any of them is correct

Changed 21 months ago by stkn

Patch for Controller.php to fix the redirect to dashboard bug

comment:152 in reply to: ↑ 151 Changed 21 months ago by bugmenot

Replying to xiaotianhu:

Replying to bugmenot:

Hello all

I have a Problem:

I use: Piwik 1.8.2 with ClickHeat: 1.9-revB Piwik Plugin

it works very good but it wont display the background of my Webseite:

http://www.imgbox.de/show/img/4nYLEwscza.png

what is wrong with my Config?

First,you should see if the iframe's src is correct,just use chrome's developer tools to see.
The Iframe's src was set empty as init,then changed by the function in Plugins/Clickheat/lib/js/admin.js
loadIframe(),it generates an ajax request to the Controller in Plugins/Clickheat/Controller.php with the function iframe()
it loads the url from the file in tmp/cache/clickheat/logs/siteid,groupname/url.txt
just see if any of them is correct

Thx for your help

I think it's a FireFox Problem

With Opera and Chrome works all perfectly!

comment:153 Changed 20 months ago by kenhell

Hi there,

I just installed the heat map plugin and it works properly - thanks!

But I have still some questions:

  1. What is the best way if I need to implement it on several homepages? Should I use groups and name them like the homepage's names?
  1. On one single page there are several others like xyz.com, xyz.com/blog, xyz.com/resources and the like. Do I have to implement the java script onto every site I want to track?

Thanks in advance!!!

comment:154 Changed 19 months ago by clippit

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.

comment:155 Changed 17 months ago by DefconRhall

I've gotten it installed with Piwik 1.9.2 and it seems to work good.
The problem I have is that is you select a group and then a date range, if there is not data for one or more of those dates it tells you that their is no data at all. Forcing me to have to choose specific days to look at.

The other issue seems to be that if you have a url parameter with a / in it such as:
/shop/index.php?route=common/home
It doesn't always process the page correct when you go to view the heatmap it might just only try to view the page as /shop/index.php?route=common

A bit annoying but I am still able to get the majority of the use out of it.

I am using it with grouping set to the page title, and on a shopping cart site, so we can see how users are interacting with specific products. As a result of course we have several groups, which we don't mind but rather annoying when trying to filter to specific days to view information because one day might not be visited.

comment:156 Changed 17 months ago by werter00

Hi Guys.
I'm trying to install this plugin for ages. Maybe I'm blind but I don't get it how to install it.
I've it visible in piwik installation. I tried to run index.php as the instruction on the http://www.labsmedia.com/clickheat/156926.html but firstly got 403. Added .htaccess to /libs folder inside clickheat installation. Now I get 500 error :/
Any ideas? If I manage to run this bloody index.php file will it help me configure the rest? I mean js code on the tracked site? Small step by stepp instalation manual would be great.

comment:157 Changed 17 months ago by blade106

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.

comment:158 Changed 2 months ago by matt (mattab)

  • Resolution set to answered
  • Status changed from new to closed

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!

comment:159 Changed 2 months ago by matt (mattab)

  • Keywords third-party-plugin added

Adding third-party-plugin tag to all Piwik 1.x third party plugins. For more information, please visit the Developer docs, the Plugins Marketplace, the themes Marketplace and see #4607

If you have any question or feedback, get in touch in our Piwik developers forum. Happy new year 2014!

comment:160 Changed 2 months ago by matt (mattab)

  • Milestone Third Party Piwik Plugins deleted

Milestone Third Party Piwik Plugins deleted

Note: See TracTickets for help on using tickets.