Liquid API
is_tester
Check if a customer account is marked as a test account for development purposes.
Syntax
customer.metafields.lantern.is_testerDescription
The is_tester metafield indicates whether a customer account is flagged as a test account. This is primarily used during development and testing phases to identify accounts that should be excluded from analytics, email campaigns, or production metrics.
Properties
Type: Boolean
Namespace: lantern
Return Values
| Scenario | Value | Type |
|---|---|---|
| Account is marked as test | true | Boolean |
| Account is not a test account | false | Boolean |
| Status not set | null | null |
| Logged out | null | null |
Examples
Basic Test Account Check
{% assign is_tester = customer.metafields.lantern.is_tester %}
{% if is_tester %}
<div class="test-account-banner">
<strong>⚠️ Test Account</strong>
<p>This is a development test account</p>
</div>
{% endif %}