What is the difference between "contains" and "is set"

In a trigger conditions I want o fire a tag on pages views that have the userId variable defined, as per Piwik’s docs.

However, I only see a very small subset of sessions working, and I suspect that there is something wrong with the tag trigger filtering.

So, when should one use “is not empty”/“is empty” and “is set”/“is not set”

Basically the logic behind these conditions are:
is not empty - a variable returns some value and it is not empty (similar to “is set”)
is empty - a variable does not return some value and the value is empty, e.g. null, undefined, and an empty string (similar to “is not set”)
is set - any value for a variable has been set apart from null or undefined (similar to “is not empty”)
is not set - there was no value set for this variable excluding an empty string (similar to “is empty”)

There are some core differences in the logic:
If the variable returns undefined —> The variable is empty and is not set
If the variable returns null —> The variable is empty and is not set
If the variable returns an empty string (“”) —> The variable is empty and is set
If the variable returns a string or an integer —> The variable is not empty and is set

Thanks! But how can I debug and see what actual values are returned by Piwik? To see if it’s actually null or undefined

You can see these values by accessing your site in the debug mode and then going to Events log > stg.click (or any other event) > Variables. As soon as you access the section, you will be able to see the values of each built-in or custom variable.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.