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 to provide funnel analysis report #5640

Closed
anonymous-matomo-user opened this issue May 10, 2008 · 71 comments
Closed

Plugin to provide funnel analysis report #5640

anonymous-matomo-user opened this issue May 10, 2008 · 71 comments
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.

Comments

@anonymous-matomo-user
Copy link

a plugin which tracks visitor behaviour for defined funnels where a funnel represents a serie of ordered pages a visitor has to browse / complete (for instance a checkout process).

Interesting metrics to know would be
- # of visitors starting the funnel
- continuing the to next step
- the (onsite) page they’re going to when they step out of the funnel
- the page they use to reach the particular funnel step.

Funnel charts UI, see http://peltiertech.com/WordPress/bad-graphics-funnel-chart/

See: [Page flow analytics](http://piwik.org/docs/transitions/)
Keywords: third-party-plugin

@anonymous-matomo-user
Copy link
Author

this would be a great addition to piwik. it is one feature, google analytics has, but piwik doesnt. the ability to analyse a funnel-process is very important for a lot of companies. so this feature would make piwik even more attractive to them.

@robocoder
Copy link
Contributor

see also ticket #460

@mattab
Copy link
Member

mattab commented Jul 23, 2009

Attachment:
funnel 1.png

@anonymous-matomo-user
Copy link
Author

I'm currently attempting to make a plugin to this extent for my own purposes, but just thought I'd share a very simple SQL snippet that could be useful.

SELECT v.location_ip, a.name FROM `piwik_log_action` a, `piwik_log_visit` v, `piwik_log_link_visit_action` l WHERE (v.idvisit = (SELECT idvisit FROM `piwik_log_visit` ORDER BY idvisit DESC LIMIT 1) AND v.idvisit = l.idvisit) AND (l.idaction_url = a.idaction) ORDER BY l.idlink_va

This will retrieve the entire visitor path for the last visitor, this could be ammended to do what you actually want very easily.

I'll update again when I put an interface to what is currently a colletion of SQL snippets.

Ryan

@mattab
Copy link
Member

mattab commented Jul 8, 2010

The bigger challenge of this ticket is to report on each specific subpath from a given page, but efficiently and with large data sets. Rather than path by visitor, we are interested in per page metric.

@anonymous-matomo-user
Copy link
Author

I understand the bigger scope here. I was providing the snippet as a general POC that the data is available in exisiting databases and can be mined retrospectively (an advantage over existing proprietary solutions), and also to provide a starting point for anyone requiring a small-scale quick solution via their own database.

My current development is able to retrieve statistics for any given path, (since this data is easily mined) on a per-visit/per-page basis but it is not efficient.. yet. I'm currently trying the possibility of archiving data relevant to pre-defined funnel rulesets on *.compute and then only having to retrieve the relatively small set of data for the period since last archive.

(An interesting side development of the way I'm currently looking at accessing data, is that a real-time web map, showing paths to from any given url and its "neighbours" would be a trivial development beyond this. If such a plugin doesnt currently exist.)

Ryan

@mattab
Copy link
Member

mattab commented Jul 8, 2010

I think it's going to be very hard (too hard?) to scale Funnel analytics for Piwik. This would significantly slow down archiving for sure.

However real time visualization of paths on a map, if done well, would certainly be a killer :)

@anonymous-matomo-user
Copy link
Author

Hi,

As part of my work at http://mysociety.org I've started work on a plugin to produce a funnel report. The code is available here:

http://github.com/mysociety/funnels

It's pretty early days, but it now allows you to define a series of funnel steps associated with a goal, and will track visits to those steps and visualize the results. It's developed against piwik 0.6.4. It takes quite a strict approach to the idea of a funnel at the moment, requiring that steps are visited consecutively in one visit in order for a funnel conversion to be recorded. Any feedback welcome!

@robocoder
Copy link
Contributor

crowbot: glad to see someone working on this. Can you post some screenshots?

The strict approach to a funnel is flawed because it's sequential and only represents the percentage not filtered out. (Technically, it's a sieve.) In reality, people may enter at different points along the path, or even skip steps. (This might even be viewed as a subset of click path analysis.)

License. We'll have to provide some license guidance if we include Funnels with the core Piwik distribution, but GNU Affero GPL is ok.

@anonymous-matomo-user
Copy link
Author

Attachment: Piwik funnel module screenshot
Picture 1.png

@anonymous-matomo-user
Copy link
Author

Attachment: Screenshot of creating/editing funnel
creating_funnel.png

@anonymous-matomo-user
Copy link
Author

vipsoft: I've uploaded a couple of screenshots as requested. I think you're right, the strict approach definitely has flaws. However, with entry and exit stats you do have some indication of where people are going when they are filtered out, and where they join (or rejoin) the funnel from. I'm going to gather some feedback from our team on whether this interpretation of what a funnel is is useful to them in practice, or if they'd prefer something more fuzzy.

@robocoder
Copy link
Contributor

Nice. Have you built any widgets, similar to the bar chart and multi-line (evolution) chart discussed in peltiertech blog? Such might be useful for the dashboard or a funnel overview screen.

@anonymous-matomo-user
Copy link
Author

Not yet. Agreed that would be a nice addition for the overview.

@mattab
Copy link
Member

mattab commented Sep 21, 2010

That looks really good and interesting :)

Can you please post the current status of the code (after maybe a quick review as per coding standards http://dev.piwik.org/trac/wiki/CodingStandard if you have time). It would be great to look at the code and give some feedback early in the process, so we can hopefuly include this in piwik core in the future? Cheers! great work

@robocoder
Copy link
Contributor

I'm going to try and review it this week.

Silly question: does a funnel path have to be associated with a goal?

@robocoder
Copy link
Contributor

I'll try to find more time for review, but from a cursory examination:

  • this nested loop would concern me re: the impact on tracker performance in recordFunnelSteps:
// pseudo-code
foreach($funnels as $funnel) {
    foreach($steps as $step) {
        if($step['url'] == $actionUrl || $step['name'] == $actionName) {
            SELECT ...
            INSERT ...
        }
    }
}
  • not obvious from the funnel definition page that 'Name' corresponds to action name, and that a "match" for a particular step is either by url or action name; personally, I expected Name to be a free-form description of the step
  • answering my question in comment:18, there should be some help message on the funnel definition page that the goal is implicitly the last step; the dropdown list should exclude manually triggered goals as these have no associated URL
  • API.php: getFunnels, getFunnelsByGoal: should check has view access
  • unit test fails because piwik_funnel table hasn't been created
Exception: Test_Piwik_Funnels -> test_addFunnel -> Unexpected exception of type [Zend_Db_Statement_Exception] with message [SQLSTATE[42S02]: Base table or view not found: 1146 Table 'piwik_tests.piwik_funnel' doesn't exist] in [/path/to/piwik/libs/Zend/Db/Statement/Pdo.php line 234]
  • integration tests fail once plugin is activated (i.e., no expected results)

@anonymous-matomo-user
Copy link
Author

Replying to vipsoft:

I'll try to find more time for review, but from a cursory examination:
[...]

OK, that gives me a few improvements to be going on with :)

@robocoder
Copy link
Contributor

recordFunnelSteps() might benefit from the tracker cache to replace the call to Funnels_API getFunnels():

  • The tracker cache are files in tmp/cache/tracker to reduce the number of SQL queries by the tracker.
  • In plugins/SitesManager/SitesManager.php, recordWebsiteDataInCache() hooks on "Common.fetchWebsiteAttributes" to cache site data. The funnel steps for each site could also be saved this way.
  • In API.php, any update of the site table is followed by a call to Piwik_Common::regenerateWebsiteCacheAttributes().
  • recordFunnelSteps would call Piwik_Common::getCacheWebsiteAttributes( $idSite ) to access the tracker cache (which may already be loaded at this point), thus avoiding a SELECT during tracking.

@robocoder
Copy link
Contributor

I'm falling asleep, but I want to record some thoughts re: the nested foreach loop:

  • if steps are unique, INSERT IGNORE could replace SELECT + INSERT; then inner could "break" after the INSERT
  • alternately, might reduce to a single loop by flipping the funnel data structure around to quickly lookup url/name-to-funnel(s)

@anonymous-matomo-user
Copy link
Author

Sorry if I'm posting this in the wrong place:

Is it possible to add manual goals tracking support to the plugin?
Some actions just can't be tracked as URLs.

@mattab
Copy link
Member

mattab commented Nov 16, 2010

crowbot, it would be great to work together to put this plugin into Piwik core.

Do you have a more recent version than the one vipsoft reviewed?

I would like to do a review, but maybe you are making some changes at the moment. Please let me know if you would like a review now or a bit later. Thanks!

@anonymous-matomo-user
Copy link
Author

Replying to matt:

crowbot, it would be great to work together to put this plugin into Piwik core.

Do you have a more recent version than the one vipsoft reviewed?

I would like to do a review, but maybe you are making some changes at the moment. Please let me know if you would like a review now or a bit later. Thanks!

Hi matt,

I did start work on replacing the tracker loop with an "INSERT IGNORE" statement - but I haven't really tested it at all - I'll try and get that version checked in in the next week or so - so a bit later would be great!

Thanks

@mattab
Copy link
Member

mattab commented Nov 18, 2010

crowbot, just one requirement before the review: could you please change the license to GPL to ensure we can safely include it in the Piwik core? It seems it is currently under AGPL but unfortunately this is not compatible with GPL. Thanks!

@anonymous-matomo-user
Copy link
Author

Replying to matt:

crowbot, just one requirement before the review: could you please change the license to GPL to ensure we can safely include it in the Piwik core? It seems it is currently under AGPL but unfortunately this is not compatible with GPL. Thanks!

As far as I'm aware, AGPL3 and GPL3 should be compatible:

http://www.gnu.org/licenses/gpl-faq.html#v3Notwithstanding

Can you tell me where the problem arises? Thanks!

@robocoder
Copy link
Contributor

(This'll be terse...I'm afk an using my iphone.)

the licenses are compatible to the extent that we can redistribute gpl and agpl code together, but is problematic if copying/pasting code between the two (eg as in refactoring).

I jotted some notes in #1826 to document the effect of the "network interaction" and "corresponding source" clauses, but will have to revise the text given the expanded scope, ie a request by the js tracking code to the piwik server (and thus, tracker plugins) qualifies as "network interaction"; also "corresponding source" means all modified source, not just those changes upon which a customized Funnels plugin might depend on. This changes the intent behind the decision to use the GPL (instead of AGPL).

For inclusion in core, I would prefer GPLv3 or later, so that there's less licensing confusion.

@anonymous-matomo-user
Copy link
Author

Replying to vipsoft:

(This'll be terse...I'm afk an using my iphone.)

Thanks for that clarification. I wrote the plugin in the course of my job at mySociety so I'll need to check that the relicensing will be OK. I'll do that now.

@mattab
Copy link
Member

mattab commented Nov 22, 2010

Thanks for checking crowbot. We believe this plugin is a great candidate for future inclusion in core and it would be really nice to work together on including it.

Of course, we would be happy if you write a blog post about how the plugin and include a link to your company's website if it helps.

@anonymous-matomo-user
Copy link
Author

Replying to matt:

Thanks for checking crowbot. We believe this plugin is a great candidate for future inclusion in core and it would be really nice to work together on including it.

Of course, we would be happy if you write a blog post about how the plugin and include a link to your company's website if it helps.

OK, license change done.

@robocoder
Copy link
Contributor

This is a brain dump, eg new reports / enhancements to this plugin.

  • page views -> unique visits -> user sessions / unique visitors -> ROI / conversion tracking -> click paths / funnels -> propensity to repurchase

@anonymous-matomo-user
Copy link
Author

For anyone that gets stuck using this, the folder needs to be renamed "Funnels" from "jesstelford-funnels-bb5f2c2" before it's loaded into the Plugin folder.

@anonymous-matomo-user
Copy link
Author

This plugin is not working with Piwik 1.8.4. If anyone make it work, please do let me know the steps. Thanks in Advance.

@mattab
Copy link
Member

mattab commented Oct 21, 2012

See: Clickpath analytics

@YanK-fr
Copy link

YanK-fr commented Apr 24, 2013

I make this update in my society :
https://github.com/YanK-fr/funnels

@anonymous-matomo-user
Copy link
Author

Refering to https://github.com/YanK-fr/funnels you also have to change the API.php in Funnels Plugin and replace:

Piwik_Common::regenerateCacheWebsiteAttributes

through:
Piwik_Tracker_Cache::regenerateCacheWebsiteAttributes

@YanK-fr
Copy link

YanK-fr commented Jun 7, 2013

Updated thanks ;)

@hpvd
Copy link

hpvd commented Sep 17, 2013

Many thanks for your continuous work!
Will there be a new "release" of the latest version on
https://github.com/YanK-fr/funnels/releases ?

and maybe you could also push this latest version also to
the non official marketplace
https://github.com/csuenkel/piwik_marketplace
(at this time there seems to be a very old version available there: "0.1 alpha")

=> doing this lots non advanced piwik users would be happy and could use your great plugin - without an installation hurdle...

@sgiehl
Copy link
Member

sgiehl commented Sep 17, 2013

Maybe its better to wait for Piwik 2.0 and the official Piwik Plugin Marketplace, which will be released this year...

@hpvd
Copy link

hpvd commented Sep 17, 2013

yes I know it's coming.. .
since the plugin is hosted on github, it only seem to be a very small effort to distribute it in this marketplace: there is an automated process:
http://plugin.suenkel.org/blog/index/2013/03/github-sync/

@hpvd
Copy link

hpvd commented Sep 17, 2013

oh someone must have already noticed the age of the available version
=> now a newer version (1.11) is available via this marketplace :-)

But there seem to be a problem => how could it be set up? There is a new tab "Funnel" with a text "Funnels Management" - is it a broken link to a config site??

edit: ah ok it should look like
http://issues.piwik.org/attachments/5640/creating_funnel.png

everything below the words "Funnels Management" is missing
see:
http://issues.piwik.org/attachments/5640/funnel_v1-11-piwik_v1-12.png

and a tiny thing: the funnel tab is shown before the dashboard

Piwik 1.12 php 5.3

@hpvd
Copy link

hpvd commented Sep 17, 2013

Attachment:
funnel_v1-11-piwik_v1-12.png

@anonymous-matomo-user
Copy link
Author

Hi,

I don't have installed the last version of the pluggin with Jess's enhancements, but I have a question there :

I have a conversion funnel where all the steps are in fact the same page (//host/souscription?orderid=1234).
Can we define different steps of the tunnel with the same URL ?

Thanks
Florian

@anonymous-matomo-user
Copy link
Author

Pluggin https://github.com/YanK-fr/funnels installed !

To answer to my question above, even if the different steps of the tunnel use the very same URL, you can use title of page to differentiate them. Well done.

However, I got this warning on each tab with many yellow boxes and long backtraces :

Warning: Invalid argument supplied for foreach() in /var/www/html/piwik/plugins/Funnels/Funnels.php on line 660

There is something to do with the date retrieved in the request.
Indeed, this happen only when the period's end-date is upper than the date where I installed the pluggin.

If somebody can help...

I use Piwik v1.12

Thanks !
Florian

@mattab
Copy link
Member

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!

@Tobias-Conrad
Copy link

hey please point to a working funnel plugin that is working with piwik 2.x
i did not find any working

@Bugsbane
Copy link

I see this was closed, but not what the resolution was. Is it abandonware? Did someone come up with a replacement? Missing funels is the Primary reason I'm going with OWA when I would rather be using Piwik overall.

@mattab
Copy link
Member

mattab commented Apr 20, 2015

@Bugsbane Goal Funnel feature is tracked in: #6080

@mattab mattab removed the worksforme The issue cannot be reproduced and things work as intended. label Dec 1, 2016
@mattab
Copy link
Member

mattab commented Dec 7, 2016

Hello everyone,

We've just launched the new Funnels premium plugin! The premium Funnels plugin provides really powerful Conversion Funnels analytics directly in Piwik. Learn more & get the plugin in the Funnels Marketplace page. Check the Funnels User Guide and Funnels FAQ for more information. Looking forward to hearing your feedback!

@Bugsbane
Copy link

My feedback is that I can't justify $199 every year on an analytics funnel plugin. :(

@Tobias-Conrad
Copy link

google analytics is the answer, nice funnels there and free.
do not mind privacy, open source and piwik,
it does not make sence anymore tracking is anywhere.

just get the numbers to higher conversion to speed up business.
i do it on my companie. saleswonder.biz

@mattab
Copy link
Member

mattab commented Dec 17, 2016

Hi @Bugsbane - feel free to contact us at https://www.innocraft.com/#contact as I'm sure we can arrange something.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Projects
None yet
Development

No branches or pull requests

8 participants