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

add parameters "customPara=customPara" in url in dashboard for plugin developer #948

Closed
anonymous-matomo-user opened this issue Aug 24, 2009 · 5 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

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

@robocoder
Copy link
Contributor

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

mattab commented Aug 24, 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-matomo-user
Copy link
Author

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.

@anonymous-matomo-user
Copy link
Author

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

@mattab
Copy link
Member

mattab commented Jul 29, 2010

it should be possible using ViewDataTable::setCustomParameter ?

@anonymous-matomo-user anonymous-matomo-user added this to the Future releases milestone Jul 8, 2014
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

3 participants