Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin for Click map #5493

Closed
mattab opened this issue Jan 4, 2008 · 158 comments
Closed

Plugin for Click map #5493

mattab opened this issue Jan 4, 2008 · 158 comments
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. worksforme The issue cannot be reproduced and things work as intended.

Comments

@mattab
Copy link
Member

mattab commented Jan 4, 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

@robocoder
Copy link
Contributor

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

@mattab
Copy link
Member Author

mattab commented Jul 7, 2009

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

@anonymous-matomo-user
Copy link

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

@anonymous-matomo-user
Copy link

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

@anonymous-matomo-user
Copy link

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

@anonymous-matomo-user
Copy link

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

@anonymous-matomo-user
Copy link

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://issues.piwik.org/attachments/5493/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) 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) 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

@dugwood
Copy link

dugwood commented Feb 1, 2010

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

@dugwood
Copy link

dugwood commented Feb 2, 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
Copy link

dugwood commented Feb 2, 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.

@anonymous-matomo-user
Copy link

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

Warning: Piwik_ClickHeat_Controller::include() 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
...

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

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

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

@anonymous-matomo-user
Copy link

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

@dugwood
Copy link

dugwood commented Feb 2, 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.

@anonymous-matomo-user
Copy link

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?

@dugwood
Copy link

dugwood commented Feb 2, 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.

@anonymous-matomo-user
Copy link

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!

@dugwood
Copy link

dugwood commented Feb 2, 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).

@anonymous-matomo-user
Copy link

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'

@dugwood
Copy link

dugwood commented Feb 2, 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

@anonymous-matomo-user
Copy link

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

https://github.com/piwik/piwik/blob/master/core/Tracker.php
https://github.com/piwik/piwik/blob/master/core/Tracker/Visit.php

@dugwood
Copy link

dugwood commented Feb 3, 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
Copy link
Contributor

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
Copy link

dugwood commented Feb 3, 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).

Thanks.

@anonymous-matomo-user
Copy link

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

@anonymous-matomo-user
Copy link

Replying to jimbo:

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

@anonymous-matomo-user
Copy link

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.

@anonymous-matomo-user
Copy link

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

@anonymous-matomo-user
Copy link

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!

@dugwood
Copy link

dugwood commented Feb 19, 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
Copy link

dugwood commented Feb 19, 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.

@dugwood
Copy link

dugwood commented Mar 2, 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 :-(

@anonymous-matomo-user
Copy link

Hi

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

@anonymous-matomo-user
Copy link

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!

@anonymous-matomo-user
Copy link

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

@anonymous-matomo-user
Copy link

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

@dugwood
Copy link

dugwood commented Jun 12, 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.

@anonymous-matomo-user
Copy link

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.

@anonymous-matomo-user
Copy link

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?

@anonymous-matomo-user
Copy link

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 ?

@anonymous-matomo-user
Copy link

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

@anonymous-matomo-user
Copy link

Attachment: Patch for Controller.php to fix the redirect to dashboard bug
piwik-clickheat-fix-redirect-to-dashboard-bug.patch

@anonymous-matomo-user
Copy link

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!

@anonymous-matomo-user
Copy link

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?
  2. 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!!!

@clippit
Copy link

clippit commented Oct 8, 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.

@anonymous-matomo-user
Copy link

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.

@anonymous-matomo-user
Copy link

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.

@dugwood
Copy link

dugwood commented Nov 24, 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
Copy link
Member Author

mattab commented Feb 6, 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
Copy link
Contributor

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

@mattab mattab changed the title Plugin for Click Heatmap Plugin for Click map Oct 2, 2014
@mattab
Copy link
Member Author

mattab commented Oct 2, 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

@matomo-org matomo-org locked and limited conversation to collaborators Oct 2, 2014
@mattab
Copy link
Member Author

mattab commented Mar 24, 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.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. worksforme The issue cannot be reproduced and things work as intended.
Projects
None yet
Development

No branches or pull requests

9 participants