Visitor Data Api allows the storage of visitor-related data associated with user interactions on a website. It provides functions to gather and process information about visitors.
The SaveData
method enables the saving of visitor-related data associated with user interactions on a website.
POST /VisitorData/SaveData/{accountId}/{visitorId}/{messageId}
{accountId}
- guid - ID of the account associated with the website.{visitorId}
- string - Unique visitor ID, identifying a specific user.{messageId}
- string - ID of the message or interaction related to the data.It is recommended to include the following headers:
Content-Type: application/json
- specifies the format of the data sent in the request.X-TrueEngage-ApiKey
- string - ApiKey allowing authorization for the request.Example Usage:
curl --location '/VisitorData/SaveData/60/a0b47535-6f24-4e89-bbc3-b5419a11db05/6051d89f61f4c3cd18f1ac3007ec31a3' \\
--header 'content-type: application/json' \\
--header 'x-trueengage-apikey: XXX' \\
--data '
{
"FirstName": "Kevin",
"LastName": "McCallister",
"Cart": [
"Video Game",
"AAA battery"
],
"Address": {
"Street": "671 Lincoln Ave.",
"City": "Illinois",
"Country": "US"
}
}'
Exercise caution when using the SaveData
function. Ensure that the ApiKey is securely stored and not publicly exposed, as it authorizes requests to the API.
It is recommended to perform SaveData
related queries from the backend or a secured environment to avoid potential security issues like misuse of the ApiKey.