Skip to main content

Publish Experiment Events

PUT 

/context

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

Request

Header Parameters

    X-Agent stringrequired

    The User-Agent of your SDK.

    Example: absmartly-Java-SDK v1.0.1
    X-Environment stringrequired

    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 stringrequired

    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 int64required

    The application version which you are running your experiments on.

    Example: 0

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 booleannullable
    historic booleannullable
    publishedAt int64required
    units object[]required
  • Array [
  • type stringrequired
    uid string

    Possible values: non-empty and <= 640 characters

  • ]
  • exposures object[]
  • Array [
  • id int32required
    name stringrequired
    unit stringnullable
    variant int32required

    Possible values: <= 128

    exposedAt int64required
    assigned booleanrequired
    eligible booleanrequired
    overridden boolean
    fullOn boolean
    custom boolean
    audienceMismatch boolean
  • ]
  • goals object[]
  • Array [
  • name stringrequired
    achievedAt int64required
    properties objectnullable
  • ]
  • attributes object[]
  • Array [
  • name stringrequired
    value nullable
    setAt int64required
  • ]

Responses

Success

Schema
    ok booleanrequired
    warnings object[]
  • Array [
  • batchIndex integerrequired
    eventIndex integerrequired
    subject stringrequired
    message stringrequired
  • ]
  • errors object[]
  • Array [
  • batchIndex integerrequired
    eventIndex integerrequired
    subject stringrequired
    message stringrequired
  • ]
Loading...