Skip to main content

Publish Experiment Events

A PUT request for publishing your exposures, goals and attributes.

Header Parameters
    X-Agent string required

    The User-Agent of your SDK.

    Example: absmartly-Java-SDK v1.0.1
    X-Environment string required

    The environment in which you are running your experiments. These can be found and created in your ABsmartly Web Console settings.

    Example: development
    X-Application string required

    The application in which you are running your experiments. These can be found and created in your ABsmartly Web Console settings.

    Example: www
    X-Application-Version int64 required

    The application version which you are running your experiments on.

    Example: 0
Request Body required

The data to be published.

Hashed

The hashed value describes whether your values have already been hashed, or if they are to be hashed by the Collector.

Historic

The historic value tells the Collector whether this is new or old data.

Published At

The publishedAt value is the time at which the request was made.

Units

Units are the values which are used to choose the variant assignments for each user. Unit types can be found and created in your ABsmartly Web Console settings. The payload takes the form of:

{
"type": "user_id" // The name of the unit type
"uid": "4a42766ca6313d26f49985e799ff4f3790fb86efa0fce46edb3ea8fbf1ea3408" // The value of the unit that you are tracking.
}

Exposures

Exposures tell the collector information about which variant of an experiment was shown to the user, and when:

{
"id": 3, // The ID of the exposed experiment.
"name": "exp_banner_color", // The name of the exposed experiment.
"unit": "user_id", // The unit that was used together with the experiment seed to generate the variant.
"variant": 1, // The variant that was shown.
"exposedAt": 1609244179528, // The time at which the exposure happened.
"assigned": true, // Whether the user was exposed to the experiment in this specific request, it could be that the user was not assigned because it doesn’t match the audience, or the experiment is already fullOn, or the variant was overriden, etc.
"eligible": true, // Whether the experiment is in the right part of the traffic allocation to this experiment and can be triggered.
"overridden": false, // Whether the variant was overridden or not.
"fullOn": false, // True if this experiment is fullOn and the winning variant is being forced to everyone.
"custom": false, // Whether this variant was a custom assignment.
"audienceMismatch": false // Whether this variant was shown outside of it’s specified target audience.
}

Goals

Goals are used to track various metrics that are related to your experiment. Goals can be created and found in your ABsmartly Web Console settings:

{
"name": "banner_click", // The name of the goal that you are tracking.
"achievedAt": 1609254179528, // The time that the goal was achieved.
"properties": {} // Any properties that you wish to pass along with this goal.
}

Attributes

Attributes allow for segmentation of your data on the Web Console:

{
"name": "age", // The name of the attribute.
"value": 39, // The attribute's value.
"setAt": 1609244179528 // The time at which the value was set.
}
    hashed boolean nullable

    Default value: false

    historic boolean nullable

    Default value: false

    publishedAt int64 required
    units object[] required
  • Array [
  • type string required
    uid string

    Possible values: non-empty and <= 640 characters

  • ]
  • exposures object[]
  • Array [
  • id int32 required
    name string required
    unit string nullable
    variant int32 required

    Possible values: <= 128

    exposedAt int64 required
    assigned boolean required
    eligible boolean required
    overridden boolean
    fullOn boolean
    custom boolean
    audienceMismatch boolean
  • ]
  • goals object[]
  • Array [
  • name string required
    achievedAt int64 required
    properties object nullable
  • ]
  • attributes object[]
  • Array [
  • name string required
    value nullable
    setAt int64 required
  • ]
Responses

Success


Schema
    ok boolean required
    warnings object[]
  • Array [
  • batchIndex integer required
    eventIndex integer required
    subject string required
    message string required
  • ]
  • errors object[]
  • Array [
  • batchIndex integer required
    eventIndex integer required
    subject string required
    message string required
  • ]
Loading...