Custom variable Comparision



Iam tracking a custom variable “Card” in Piwik, and I need a count of visitors, where this variable IS and IS NOT set.

But i can’t get count for empty variable. It shoud end with == or =@ (contains). IS this syntax correct?

// is not empty    
'segment=customVariablePageName1==Card;customVariablePageValue1!=' // works 

// is empty (does not work)
'segment=customVariablePageName1==Card;customVariablePageValue1==' // returns 0
'segment=customVariablePageName1==Card;customVariablePageValue1=@' // alternative



You got also wrong information in your documentation. Segmentation: API Reference - Matomo Analytics (formerly Piwik Analytics) - Developer Docs - v3
"Note: Leaving an empty value is supported for the operators == and !=="
Operator !== does not exist in piwik as you say, so how can it be used???