putBoolean

Adds a tag with a boolean value.

Use for binary flags, subscription states, feature toggles, or any yes/no attribute. Boolean tags are ideal for segmenting users based on true/false conditions.

Example (Subscription Service):


new TagsBundle.Builder()
    // Subscription status
    .putBoolean("premium_member", true)
    .putBoolean("trial_active", false)
    .putBoolean("auto_renew_enabled", true)

    // Communication preferences
    .putBoolean("email_notifications", true)
    .putBoolean("push_notifications", true)
    .putBoolean("sms_notifications", false)

    // Feature flags
    .putBoolean("beta_features_enabled", true)
    .putBoolean("gdpr_consent", true)
    .build();

Return

this Builder instance for method chaining

Parameters

key

tag name (e.g., "premium_member", "email_subscribed", "onboarding_completed")

value

boolean value (true or false)