Skip to main content

What are Claimr widget attributes?

When you embed the Claimr widget into your website or application, you use widget attributes within the integration script to customize its behavior and appearance. These attributes control what users see, allowing you to show or hide specific parts of the widget based on your business needs, user type, or even location-specific requirements (like country-based restrictions). Essentially, widget attributes allow you to tailor the user experience, deciding what content appears and for whom.

How to add attributes

Add attributes directly into the Claimr script you’ve copied from the Publish section.
  1. Navigate to and click the Publish button in your campaign (upper right corner).
  2. In the opened window, click Get integration code. This will open the window with an embed code.
  3. Copy and paste the provided widget script into your website or application’s code.
  4. To customize the widget’s behavior, manually add the desired data- attributes (detailed below) directly inside your <script> tag.
Example:
In this example:
  • data-addons: Used to enable or hide specific content blocks or features.
  • data-organization: Sets the organization ID to ensure the widget pulls data from the correct campaign.

List of data attributes

This section lists all supported data-* attributes for the Claimr widget. Add them to the script tag (or to the <body> tag where specified) to control the widget’s behavior, appearance, or user experience.
Attributes marked with an asterisk * are required or applied by default.

Default attributes

Feature control

Advanced integration

Contextual display settings

Points badge

The SDK includes a built-in points/XP badge and toast notification UI, independent of the widget. These attributes configure it; the same settings can also be changed at runtime with the configure_points() SDK method — see the SDK documentation.

Tag-based customization

Personalize the user experience by dynamically showing or hiding Quests and Groups using tags. First, assign tags to your Quests/Groups in the Claimr admin panel. Then, use these data- attributes in your widget script to control their visibility:
  • data-hide-tags: This attribute hides Quests or Groups tagged with any of the comma-separated tags provided. For example, if a Quest Group in your admin panel is tagged new, adding data-hide-tags="new" to your script will hide that specific group:
  • data-show-tags: Conversely, this attribute is used to show Quests or Groups tagged with any of the listed comma-separated tags. This is useful if certain content is hidden by default or by other conditions and you want to make it visible for specific users (e.g., data-show-tags="beta_testers").
Using these attributes activates Claimr’s tag system. The widget receives the “show” or “hide” tags from your script, compares them against the tags on your content elements, and adjusts visibility accordingly. This enables targeted experiences like geo-restrictions or A/B testing.