Documentation
Documentation (JA)
Documentation (JA)
  • Documentation
  • Products
    • Fanplayr Targeting Portal
    • Fanplayr 360
    • PrivacyID
    • SiteSpeed
  • Features
    • Merchandising
    • Security
    • SMS
    • Web Push Notifications
      • Direct Integration Guide
      • Popup Integration Guide
      • Imaging Sizing Guide
    • Data Residency
  • Fanplayr Targeting
    • E-Commerce Integrations
      • BigCommerce
      • CommerceV3
      • Magento 1
        • Getting Started
        • Configuration
      • Magento 2
      • Miva Merchant
      • PrestaShop
      • Salesforce Commerce Cloud
      • Shopify
      • Volusion
      • VTEX
      • VTEX IO
    • Custom Integration
      • Page tracking
        • Apply to cart
        • Session offers
      • Order tracking
      • Data types
        • CartAction
        • Product
      • Data Layer API
      • Enhanced user identification
        • Manual Integration
      • Segmentation as a service
      • Lazy loading
      • Page caching
      • Tag managers
      • Single page apps
      • Custom data for verticals
        • Travel
    • Pixel Integration
    • ESP Integrations
    • Link Decoration
    • User Management
      • User Identity
      • User Properties
  • Other
    • CSP & Domains
Powered by GitBook
On this page
  • Updates via Browser
  • user.set
  • user.setOnce
  • user.increment
  • user.unset
  • Updates via Streams
  • Limitations
  • Maximum storage size

Was this helpful?

  1. Fanplayr Targeting
  2. User Management

User Properties

Managing user-level properties that can be used for segmentation and conditional logic in Streams.

PreviousUser IdentityNextCSP & Domains

Was this helpful?

Properties can be defined at the user-level and later used for segmentation and conditional logic in Streams.

Updates via Browser

User properties can be managed from the browser by pushing commands to Fanplayr's array. The following operations are supported:

user.set

Sets a property on the user record. It overwrites any existing value for the same property name.

Usage:

fanplayr_api.push({
  "_type": "user.set",
  "key": "email"
  "value": "user@domain.com",
  // Optionally expire the property after 7 days
  "maxAge": 7 * 60 * 60 * 24
});
Argument
Type
Description

key

String (required)

The name of the property to store.

value

any (required)

The value to store for the given property name.

maxAge

Number (optional)

Specifies the maximum duration in seconds to store the property.

user.setOnce

Sets a property on the user record, only if it does not already exist.

Usage:

fanplayr_api.push({
  "_type": "user.setOnce",
  "key": "firstSeen"
  "value": new Date()
});
Argument
Type
Description

key

String (required)

The name of the property to store.

value

any (required)

The value to store for the given property name.

maxAge

Number (optional)

Specifies the maximum duration in seconds to store the property.

user.increment

Increments or decrements a numeric property. If the property does not exist it is created and set to the amount specified.

Usage:

fanplayr_api.push({
  "_type": "user.increment",
  "key": "counter1"
  "value": 1
});

fanplayr_api.push({
  "_type": "user.increment",
  "key": "remainingCount"
  "value": -1
});
Argument
Type
Description

key

String (required)

The name of the property to store.

value

Number (optional)

The amount to increment by. Defaults to 1.

maxAge

Number (optional)

Specifies the maximum duration in seconds to store the property.

user.unset

Removes a property on the user record.

Usage:

fanplayr_api.push({
  "_type": "user.unset",
  "key": "email"
});
Argument
Type
Description

key

String (required)

The name of the property to remove.

Updates via Streams

Limitations

Maximum storage size

An overall limit of approximately 20 KB can be stored for each user. Any updates to the user data that would exceed this limit are ignored and not persisted. The names, values and expiry information for each property count towards the overall limit.

User properties can also be updated via the action in streams:

Data Layer
Update User Data
The Update User Data action interface in Streams