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
Attachment: modify custom parameters by js added by hook 'template_js_import'
00.png
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.
What is the use case for this new hook?
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.