@anonymous-piwik-user opened this Issue on May 10th 2008

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
Keywords: third-party-plugin

@mattab commented on July 23rd 2009 Owner

Attachment:
funnel 1.png

@anonymous-piwik-user commented on September 20th 2010

Attachment: Piwik funnel module screenshot
Picture 1.png

@anonymous-piwik-user commented on September 20th 2010

Attachment: Screenshot of creating/editing funnel
creating_funnel.png

@hpvd commented on September 17th 2013
@anonymous-piwik-user commented on August 7th 2008

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 commented on December 9th 2008 Contributor

see also ticket #460

@anonymous-piwik-user commented on July 8th 2010

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 commented on July 8th 2010 Owner

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-piwik-user commented on July 8th 2010

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 commented on July 8th 2010 Owner

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-piwik-user commented on September 17th 2010

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 commented on September 17th 2010 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-piwik-user commented on September 20th 2010

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 commented on September 20th 2010 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-piwik-user commented on September 20th 2010

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

@mattab commented on September 21st 2010 Owner

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 commented on October 29th 2010 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 commented on October 30th 2010 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-piwik-user commented on November 2nd 2010

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 commented on November 3rd 2010 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 commented on November 3rd 2010 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-piwik-user commented on November 5th 2010

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 commented on November 16th 2010 Owner

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-piwik-user commented on November 17th 2010

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 commented on November 18th 2010 Owner

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-piwik-user commented on November 20th 2010

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 commented on November 20th 2010 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-piwik-user commented on November 20th 2010

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 commented on November 22nd 2010 Owner

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-piwik-user commented on November 23rd 2010

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 commented on December 31st 2010 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
@mattab commented on January 17th 2011 Owner

As an update. I took some time to brainstorm the Funnel plugin, and I think we can do it with much better performance, no new table, but schema updates to existing tables. It is quite some work to rewrite though so I won't suggest this in the code review. I think the easiest is to keep maintaining this plugin for the time being as a Third Party plugin, then we can do the rewrite and reuse some code from this plugin (For example, the Report HTML/CSS which looks great).

To explain a bit my ideas in the implementation:

  • introduce limitation of number of Goals per website (eg. 10 goals)
  • for each goal, add funnel_first_step_1, funnel_last_step_1, funnel_ref_idaction_1, funnel_exit_idaction_1 in the log_visit table (_1 means for Goal id=1)
    Then in Tracker, the funnel IDs would be updated on each page view, processing at each page view if the visitor enters/exits the funnel, and keeping track of where it enters from and where it exits from (similar to a mini visit inside a visit).

so I think tracking funnel could be done without any extra DB lookup, which would be great.
Also during Archiving, it would be fast since all the fields to build the funnel report would be in the log_visit table and integers.

Hopefully one day we can implement this solution in core, in the meantime, this plugin is great for most users :)

@robocoder commented on January 17th 2011 Contributor

My thought is that if we support multiple goal conversions before per visit, then Funnels and Goals should be more loosely coupled. This could then be expanded (subclassed?) for clickpath analysis and split a/b testing.

@anonymous-piwik-user commented on February 3rd 2011

Is anyone using this on piwik 1.1.1?

After installing, I'm just getting a blank page below the "Funnels Management" text.

@anonymous-piwik-user commented on February 10th 2011

I installed it on 1.1.1 and found that as well. I have multiple websites tracking in my Piwik, and I can no longer select websites on the All Websites link at the top as the page is blank there too. Any ideas folks?

@anonymous-piwik-user commented on February 10th 2011

Replying to tyroden:

I installed it on 1.1.1 and found that as well. I have multiple websites tracking in my Piwik, and I can no longer select websites on the All Websites link at the top as the page is blank there too. Any ideas folks?

Looks like the plugin needs some updating to work with piwik 1.1.1. I'll take a look at it next week.

@anonymous-piwik-user commented on February 11th 2011

I've made a fix to the plugin and it's now working for me under 1.1.1.

@anonymous-piwik-user commented on February 14th 2011

Replying to crowbot:

I've made a fix to the plugin and it's now working for me under 1.1.1.

crowbot, i cannot confirm that. after activating the plugin no statistic data is loaded in all pages (Dashboard, Visitors etc.)
Maybe this is just with my installation, can anyone confirm that?

but thank you anyway for your effort.

@robocoder commented on February 14th 2011 Contributor

fbrem: did you delete the files in tmp/cache/tracker/* ?

@anonymous-piwik-user commented on February 14th 2011

vipsoft: jep, i did. Is the plugin working with your piwik installation?

@anonymous-piwik-user commented on April 3rd 2011

Has anyone been using this with 1.2.1? I was able to fix a couple of the runtime errors I encountered, but the funnels don't actually seem to be working.

@anonymous-piwik-user commented on April 21st 2011

Replying to ksuther:

Has anyone been using this with 1.2.1? I was able to fix a couple of the runtime errors I encountered, but the funnels don't actually seem to be working.
I'm trying this fork on 1.2.1: https://github.com/msteffeck/funnels

@anonymous-piwik-user commented on May 20th 2011

Has anyone had any further luck with this plugin?

I am running 1.4 and get this error when I create a funnel:
Fatal error: Call to undefined method Piwik_ArchiveProcessing_Day::queryConversionsBySegment() in /var/www/html/mobileab/httpdocs/piwik/plugins/Funnels/Funnels.php on line 175

The link for the above fork seems to be broken - it would be a great feature to have working

@anonymous-piwik-user commented on June 20th 2011

For those interested, I have forked mysociety's Funnels plugin and it is now working with Piwik v1.5, with the following enhancements:

Limitations:

  • I haven't looked into the speed issue when archiving (inner loop with SELECT INSERT).
  • There are no tests (Haven't looked into writing tests in Piwik yet).
  • UI has been hacked a little so it's a bit less elegant than mysociety's original version

https://github.com/jesstelford/funnels

If you have any feedback or want to help out (especially in the area of writing tests), feel free to fork the repo and send me a pull request with your commits :)

@anonymous-piwik-user commented on October 19th 2011

will this plugin be part of the official 1.7 release? - (would like it ;) ) thanks kay

@mattab commented on February 19th 2012 Owner

NOTE: there is a report in the forums that this plugin is NOT compatible with Piwik 1.7!

@mattab commented on February 19th 2012 Owner

Moving to feature request for now

If you use this plugin with 1.7 and it is working for you please comment here, we will put this plugin back in the list of plugins

@anonymous-piwik-user commented on February 20th 2012

Should be working for v1.7 as of commit bb5f2c258c - grab the latest code from the GitHub repository:

https://github.com/jesstelford/funnels

Thanks to Uwe Schulz for alerting me of this issue (who also supplied the German translation).

Please note that I don't have a production database of v1.7 to test this against, so if you notice any more issues, feel free to post them on the GitHub bug tracker:

https://github.com/jesstelford/funnels/issues

@mattab commented on February 20th 2012 Owner

Thanks for fixing the plugin!

@anonymous-piwik-user commented on June 26th 2012

Unfortunately I do have another issue with pikiw 1.8.2. The "Goals" only show a lot of messages in yellow boxes with the following content:

Warning: Invalid argument supplied for foreach() in /var/www/vhosts/statistics.buhl.de/httpdocs/plugins/Funnels/Funnels.php on line 659
and a long backtrace.

Is there a chance to get this error fixed? I already did some debug, but did not find anything with sense for my understanding...
Array (
[idsite] => 8
[idfunnel] => 1
[idstep] => 1
[name] => Warenkorb
[match_attribute] => url
...

goes to

foreach ($funnelDefinition['steps'] as $step) { ... }

@anonymous-piwik-user commented on August 4th 2012

This seems to be a problem when a site doesn't have a funnel setup. I will try to fix this, but the code is a mess.

@anonymous-piwik-user commented on September 24th 2012

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-piwik-user commented on September 25th 2012

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 commented on October 21st 2012 Owner
@YanK-fr commented on April 24th 2013

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

@anonymous-piwik-user commented on June 7th 2013

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 commented on June 7th 2013

Updated thanks ;)

@hpvd commented on September 17th 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 commented on September 17th 2013 Member

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

@hpvd commented on September 17th 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 commented on September 17th 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

@anonymous-piwik-user commented on September 17th 2013

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-piwik-user commented on September 20th 2013

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 commented on February 6th 2014 Owner

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 commented on February 14th 2015

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

@Bugsbane commented on April 18th 2015

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 commented on April 20th 2015 Owner

@Bugsbane Goal Funnel feature is tracked in: https://github.com/piwik/piwik/issues/6080

@mattab commented on December 7th 2016 Owner

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 commented on December 17th 2016

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

@Tobias-Conrad commented on December 17th 2016

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 commented on December 17th 2016 Owner

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 on February 6th 2014
Powered by GitHub Issue Mirror