putString
Adds a tag with a string value.
Use for text-based attributes such as names, categories, preferences, identifiers, or any non-numeric data. String tags are the most versatile type and support segmentation by exact match, contains, starts with, and other text-based filters.
Example (User Profile):
new TagsBundle.Builder()
// Demographics
.putString("name", "John Doe")
.putString("gender", "male")
.putString("country", "USA")
.putString("language", "en")
// Preferences
.putString("favorite_category", "electronics")
.putString("preferred_currency", "USD")
.putString("timezone", "America/New_York")
// Custom identifiers
.putString("customer_tier", "gold")
.putString("referral_code", "FRIEND2024")
.build();
Content copied to clipboard
Return
this Builder instance for method chaining
Parameters
key
tag name (e.g., "name", "category", "language", "customer_tier")
value
string value to store (can be null, but consider using putStringIfNotEmpty)