Actions

post

/{env}/v1/sites/{site-id}/actions

The *Actions* endpoint tracks actions for the given visitor.

Request

Supported Media Types
Path Parameters
  • Unique site identifier. The site id can be retrieved from the REST API.
Body ()
Actions
Root Schema : actions
Type: object
Title: actions
Show Source
  • actions
    Actions to be tracked for the visitor.
  • (Optional) IP address of the visitor. If omitted, "Source address" field of the packet sender is used to detect the client's IP. Used to track Sandbox actions, in case the client's IP is listed in the Company IPs list.
  • visitorIds
    (Optional) External visitor identifiers. Can be used for targeting, personalization, segmentation and reporting (via the Campaign Data Export). Pass as "id slot":"value" pairs.
  • State of the current visitor as provided in responses of previous requests.
Example:
{
    "actions":[
        {
            "name":"ItemsInBasket",
            "value":"3",
            "attribute":"USD"
        },
        {
            "name":"OrderValue",
            "value":"$5.99"
        }
    ],
    "visitorIds":{
        "5":"24350056"
    },
    "visitorState":"-1338188648|AwAAAApVAgB/uLhOWw8AA...ntbDwD/////AVsPWw///wEAAAEA"
}
Nested Schema : actions
Type: array
Actions to be tracked for the visitor.
Show Source
Nested Schema : visitorIds
Type: object
(Optional) External visitor identifiers. Can be used for targeting, personalization, segmentation and reporting (via the Campaign Data Export). Pass as "id slot":"value" pairs.
Nested Schema : action
Type: object
Show Source
  • (Optional) Attribute of the action to be tracked. You can use this to track additional information about the action. E.g. currency for a monetary value.
  • Name of the action to be tracked. Note that an action should be present for the campaign in order to be tracked.
  • (Optional) Value of the action to be tracked. You can use this to capture information about an action. E.g. monetary value for a purchase action.
Back to Top

Response

Supported Media Types

200 Response

Tracked actions
Body ()
Root Schema : tracked actions
Type: object
Title: tracked actions
Show Source
Example:
{
    "actions":[
        {
            "name":"ItemsInBasket",
            "status":"success"
        },
        {
            "name":"OrderValue",
            "status":"error",
            "errors":[
                {
                    "message":"Invalid action value: '$5.99'. Must be an integer",
                    "parameter":"value",
                    "code":"400"
                }
            ]
        }
    ],
    "visitorState":"Y2FtcGFpZ25OYW1lOiBjYW1wYWlnbjE7IGV4cGVyaWVuY2VzOiBlbGVtZW50MTp2YXJpYW50MSwgZ2VuZXJhdGlvbmlkOjMyNDMyNDMyNDMy"
}
Nested Schema : actions
Type: object
Actions tracked for the visitor.
Back to Top