Using custom variable for segmentation broken?


i’m trying to use segmentation in combination with a custom variable but I always get the response


result: "error"
message: "Segment parameter 'customVariableName1=appId' does not appear to have a valid format."


The request is,2011-04-12&token_auth=5cabba6ac9ad0b08fdb68666fa7a1435&filter_limit=100&segment=customVariableName1=appId&customVariableValue=3

The customVariable “appId” is set correctly when tracking - I can see it in the visitors log.

What am I doing wrong?

Best Regards

you should put two == signs, not just one


=> same response:


result: "error"
message: "Segment 'customVariableName1' is not a supported segment."


=> ?

best regards

… btw: I am using Piwik 1.2.1 which was upgraded automatically from 1.2.

… one additional information:

I just called - the response does now show a segment somehow related to customVariableName/Value1 or appId - should it?

If i go to “Besucher -> Besucher-Log” (Visitors -> Visitors Log) i see “appId: 3”, mouseover correctly shows “Benutzerdefinierte Variablen (index 1)” (“Custom Variables (index 1)”) …

Best Regards

… ok, I found the problem myself: The “custom variables” plugin was not activated - I guess the plugin was introduced in 1.2 or 1.2.1 and the updater did not activate it - as this was nowhere documented, I did not even now there existed such a plugin.

Best Regards

Thanks for following up. I’m surprised the plugin didn’t get enabled by default. Will remember to check this.

One little problem:

The semantics of customVariableValueX!=$value seems to be “if customVariableValueX was set for the given visit and is not equal $value”. Please make it possible to test for visits that have no setting for customVariableValueX (or customVariableNameX).



at (which was launched last week) we use piwik for real-time tracking and assign one piwik "site" to each company profile (there are thousands). A customer can claim his "sustainability profile" automatically and get's a full blown web analytics suite including cross channel tracking (there are partner apps that use the WeGreen api - the Partner Apps trackback by setting custom variables - that's what the hassle was about ,-)

Best Regards

I had this issue, “==” will solve it i guess

Happy New Year! If you are still using Piwik and interested in the awesome new feature of “Creating a Custom Segment in Piwik and apply to reports in Real time!” we need YOUR help, with a little or big donation at:

This will allow to dynamically add or edit, a new set of rules for example “Show all visitors from USA and using Firefox and using Google”. This will be done via a simple to use interface. See screenshots and more info here:

We are crowd funding the future of Piwik and this feature in particular. With your help we can do it.