@anonymous-piwik-user opened this issue on August 24th 2009

Hello, http://forum.piwik.org/index.php?showtopic=1392 As Post 2 in this topic said, is it possible to add a new parameters in url, it is very useful for plugin developer. We can add parameters with {json} such as {dataRange:'2009-01-10,2009-02-10', myPeriod:'hour', .....} or other format as develpers want. Keywords: custom parameters, plugin

@anonymous-piwik-user commented on August 25th 2009

Attachment: modify custom parameters by js added by hook 'template_js_import' 00.png

@robocoder commented on August 24th 2009

Sounds like we'll need a new global hook and some helper functions (or coding guidelines/conventions) to avoid conflict between plugins accessing a custom parameter object.

@mattab commented on August 24th 2009

What is the use case for this new hook? - do you want to globally set a custom variable/parameter to all widgets? - should it be persisted when clicks occuron widget (to sort, paginate, change view)? - several plugins can persist variables - several plugins can have different persisted variables

@anonymous-piwik-user commented on August 25th 2009

Yes, I hope it can be available to all widgets and it is persisted.

I think avoiding conflict is not difficult, for example, I use json format, and I can save array("myPlugin"=>array(param1=>'...',param2=>'...'),'otherPlugin1'=>...) in it to avoid conflict.

I'm writng ECommerce plugin, and I need some parameters to use,such as dateRange and period 'hour'.If I add param myself without modify core code, many function can not work for my plugin such as export data as csv,php....

For me, I just need a parameter persisted in url, hook is not necessary, I can use some hook such as 'template_js_import' to add a js to modify this paramters, but it is better to have a hook.

If it need much time to add this hook, I hope piwik can add this parameter without hook first if it is possible.

@mattab commented on July 29th 2010

it should be possible using ViewDataTable::setCustomParameter ?

This issue was closed on July 29th 2010
Powered by GitHub Issue Mirror