Anonymous test
Learn how to check if the user is anonymous.
This test checks whether the user is anonymous, that is, whether they have not logged in or signed up yet. It is the opposite of the identified test.
Users are anonymous until they log in or sign up. After that, they remain identified until they log out.
Tracking required
This test uses the signed-in, signed-up, and signed-out events to determine whether the user is anonymous. Without it, the user is treated as anonymous.
Syntax
This test has the following syntax:
/*<user>*/ is anonymous
To negate the test, you can write:
/*<user>*/ is not anonymous
Consider using the identified test instead of negating this test for better readability.
Parameters
These are the supported parameters:
- user
The user to check whether they are anonymous.
Examples
You can check whether a user is anonymous like this:
user is anonymous