ExperimentUser: {
    browser?: string;
    carrier?: string;
    city?: string;
    cookie?: Record<string, string>;
    country?: string;
    device_category?: "mobile" | "tablet" | "desktop" | "wearable" | "console" | "smarttv" | "embedded";
    device_id?: string;
    device_model?: string;
    dma?: string;
    first_seen?: string;
    group_properties?: {
        [groupType: string]: {
            [groupName: string]: {
                [propertyName: string]: string | number | boolean | (string | number | boolean)[];
            };
        };
    };
    groups?: {
        [groupType: string]: string[];
    };
    landing_url?: string;
    language?: string;
    library?: string;
    os?: string;
    platform?: string;
    referring_url?: string;
    region?: string;
    url_param?: Record<string, string | string[]>;
    user_agent?: string;
    user_id?: string;
    user_properties?: {
        [propertyName: string]: string | number | boolean | (string | number | boolean)[];
    };
    version?: string;
}

Defines a user context for evaluation. device_id and user_id are used for identity resolution. All other predefined fields and user properties are used for rule based user targeting.

Type declaration

  • Optional browser?: string

    The browser used, auto populated via a ExperimentUserProvider, can be manually overridden

  • Optional carrier?: string

    Predefined field, can be manually provided

  • Optional city?: string

    Predefined field, can be manually provided

  • Optional cookie?: Record<string, string>

    The cookies, auto populated via a ExperimentUserProvider, can be manually overridden Local evaluation only. Stripped before remote evaluation.

  • Optional country?: string

    Predefined field, can be manually provided

  • Optional device_category?: "mobile" | "tablet" | "desktop" | "wearable" | "console" | "smarttv" | "embedded"

    The device category of the device, auto populated via a ExperimentUserProvider, can be manually overridden

  • Optional device_id?: string

    Device ID for associating with an identity in Amplitude

  • Optional device_model?: string

    Predefined field, auto populated via a ExperimentUserProvider or can be manually provided

  • Optional dma?: string

    Predefined field, can be manually provided

  • Optional first_seen?: string

    The time first saw this user, stored in local storage, can be manually overridden

  • Optional group_properties?: {
        [groupType: string]: {
            [groupName: string]: {
                [propertyName: string]: string | number | boolean | (string | number | boolean)[];
            };
        };
    }
    • [groupType: string]: {
          [groupName: string]: {
              [propertyName: string]: string | number | boolean | (string | number | boolean)[];
          };
      }
      • [groupName: string]: {
            [propertyName: string]: string | number | boolean | (string | number | boolean)[];
        }
        • [propertyName: string]: string | number | boolean | (string | number | boolean)[]
  • Optional groups?: {
        [groupType: string]: string[];
    }
    • [groupType: string]: string[]
  • Optional landing_url?: string

    The landing page of the user, the first page that this user sees for this deployment Auto populated via a ExperimentUserProvider, can be manually overridden

  • Optional language?: string

    Predefined field, auto populated via a ExperimentUserProvider or can be manually provided

  • Optional library?: string

    Predefined field, auto populated, can be manually overridden

  • Optional os?: string

    Predefined field, auto populated via a ExperimentUserProvider or can be manually provided

  • Optional platform?: string

    Predefined field, auto populated via a ExperimentUserProvider or can be manually provided

  • Optional referring_url?: string

    The referring url that redirected to this page, auto populated via a ExperimentUserProvider, can be manually overridden

  • Optional region?: string

    Predefined field, can be manually provided

  • Optional url_param?: Record<string, string | string[]>

    The url params of the page, for one param, value is string if single value, array of string if multiple values Auto populated via a ExperimentUserProvider, can be manually overridden

  • Optional user_agent?: string

    The user agent string.

  • Optional user_id?: string

    User ID for associating with an identity in Amplitude

  • Optional user_properties?: {
        [propertyName: string]: string | number | boolean | (string | number | boolean)[];
    }

    Custom user properties

    • [propertyName: string]: string | number | boolean | (string | number | boolean)[]
  • Optional version?: string

    Predefined field, auto populated via a ExperimentUserProvider or can be manually provided