...
The JS variable should be globally accessible, so for instance, if user_id is a global variable it will take the value it contains and passes it along as feedback (as a string). The variable can also be an object or array or even a nested object (for instance: test_object.user_id) if the value of the specified variable is an array or object it will be encoded into a JSON string. Basically, as long as the variable's scope is global we'll be able to pick it up.
Examples
Trigger on a simple JS variable
The form appears if the variable example = "triggered"
:
...
Trigger on nested objects
If your object looks like: variable example = {'userGroup': 'admin'}
, then you can use example.userGroup matches admin
to make the form appear:
...
Trigger data layer content
To trigger a data layer, a wildcard [*] should be used. In this example, the form appears if the data layer ‘products’ contains the value ‘shoes’.
...