data- attributes in your widget integration script, these tags allow you to dynamically control what content is shown or hidden for individual users or user segments. This powerful feature enables you to tailor the campaign experience, making it more relevant and effective for different audiences.
Benefits of using tags for customization
- Showing specific Quests or Groups only to certain users.
- Hiding content based on user characteristics (e.g., location, past behavior).
- Creating personalized user journeys within the same campaign.
How tag-based customization works
The system relies on a two-part setup: tagging your content in the Claimr admin panel and then passing user-specific tags via the widget script.- Tagging content in Claimr: First, you assign one or more tags to specific Quests or Groups in their respective settings within the Claimr admin panel. For instructions on adding tags, see the Tags setting section in Quest settings or Group settings.
- Passing tags via widget attributes: Next, for each user session, you include specific
data-attributes in your widget integration script that tell Claimr which tags are active for that user. These aredata-show-tagsanddata-hide-tags. - Display logic: The Claimr widget then uses this information to decide what to show or hide:
- If a user is passed a tag via
data-show-tags, any entity (currently Quests and Groups) with a matching tag will be displayed to them, even if it might otherwise be hidden by default or other rules. - If a user is passed a tag via
data-hide-tags, any entity (Quests and Groups) with a matching tag will be hidden from them.
- If a user is passed a tag via
Example scenario: An X-related group of quests is tagged
x_users in the admin panel and is hidden by default. For users who have connected their X account, you pass data-show-tags="x_users" in the script. This group will then appear for those users.Configuration in Claimr admin panel
- Tagging quests and groups: Navigate to the settings page of the Quest or Group you want to tag, locate the Tags input field, and enter your desired tag(s), separating multiple tags with a comma. Example:
beta_feature,new_user_flow,region_EU. Save the Quest or Group settings. - Defining default visibility: The “default visibility” of a Quest or Group is generally determined by whether it’s set to “Hidden” in its own settings or by other campaign-level rules. The
data-show-tagsattribute is used to override a hidden state for users with matching tags. Thedata-hide-tagsattribute is used to override a visible state for users with matching tags.
Script integration configuration
As detailed in our Widget attributes article, there are 2 key attributes for tag-based customization:data-hide-tags
Pass a comma-separated list of tags. Any Quest or Group in your campaign that has one or more of these tags assigned to it will be hidden from the user for this session. Format: Comma-separated string of tags. Example:data-show-tags
Pass a comma-separated list of tags. Any Quest or Group that has one or more of these tags assigned to it will be shown to the user, even if it might be hidden by default or due to other rules. Format: Comma-separated string of tags. Example:You can use both
data-hide-tags and data-show-tags simultaneously if needed, but ensure your logic is clear to avoid conflicting rules.Practical use cases
- Geo-targeting content: Tag content with region-specific tags (e.g.,
europe_only,usa_promo). In your website/app logic, detect the user’s region and pass the appropriate tag viadata-show-tags(e.g.,data-show-tags="europe_only") or hide content for other regions usingdata-hide-tags. - A/B testing different content blocks: Create two versions of a Quest Group (e.g., Group A tagged
test_version_A, Group B taggedtest_version_B). Serve the widget script withdata-show-tags="test_version_A"to 50% of users anddata-show-tags="test_version_B"to the other 50% to test different content flows. - Hiding features unavailable to certain users: If a feature (e.g., “staking_quest”) is only available to users who meet certain criteria (e.g., KYC verified), tag that quest
staking_enabled. Only passdata-show-tags="staking_enabled"for users who have met those criteria.
data-show-tags and data-hide-tags attributes in your widget script, you can create highly dynamic and personalized campaign experiences for your users.