---
title: POST Visit Data
description: Description: An API call to send visit data to the SiteSpect engines. By default, SiteSpect counts visits according to the User Session Timeout setting in the Manage, Site Settings, User Tracking area
---

[Skip to content](https://doc.sitespect.com/knowledge/post-visit-data#main-content)

English

Show submenu for translations

![Monetate-Logo-Full-Color-1](https://doc.sitespect.com/hs-fs/hubfs/Monetate-Logo-Full-Color-1.png?width=340&height=49&name=Monetate-Logo-Full-Color-1.png)

- [A/B Testing](https://www.sitespect.com/testing-and-experimentation/)
- [Personalization](https://www.sitespect.com/personalization-targeting/)
- [Recommendations](https://www.sitespect.com/recommendations/)

Open main navigation

Close main navigation

- [A/B Testing](https://www.sitespect.com/testing-and-experimentation/)
- [Personalization](https://www.sitespect.com/personalization-targeting/)
- [Recommendations](https://www.sitespect.com/recommendations/)
- English
  
  Show submenu for translations

 How can we help you?

- There are no suggestions because the search field is empty.

1. [Knowledge Base](https://doc.sitespect.com/knowledge?hsLang=en)
2. [Analyze](https://doc.sitespect.com/knowledge/analyze?hsLang=en)
3. [SiteSpect Reports](https://doc.sitespect.com/knowledge/analyze?hsLang=en#sitespect-reports)

# POST Visit Data

**Description:** An API call to send visit data to the SiteSpect engines. By default, SiteSpect counts visits according to the User Session Timeout setting in the Manage, Site Settings, User Tracking area, typically set to 30 minutes (1800 seconds). SiteSpect evaluates the last request time via **SSRT cookie** to determine if the visit should be extended by the User Session Timeout amount or if the request should be tracked as a new visit.

**Example:** POST [https://engine-336.sitespect.net](https://engine-336.sitespect.net/)

**Note:** SiteSpect uses [cookies](https://doc.sitespect.com/knowledge/sitespects-cookies?hsLang=en) to track assignment, which must be sent and updated with all calls. For convenience, cookies and headers can be passed/received in the body of the request/response.

POST body JSON parameters:

- An array of objects. Each object represents visit data for one session.
- Top-level attributes: 
    - **Data:** An object that stores hits (and optionally value capture data) for each Metric under the Metric ID.
    - **AsmtCounted:** An array that stores the Variation Group IDs for visits that are counted. When this is sent, SiteSpect automatically updates the counted state for the visitor and Campaign based on the Variation Group ID. If the visitor has been shown a change in your application or if the AsmtCounted parameter in the GET response is true, then the Variation Group ID should be added to the AsmtCounted array. If a visitor is assigned to a Control Variation Group, mark that visitor as counted if that visitor would have seen a change from another Variation Group within that Campaign.
    - **time:**A UNIX timestamp passed as a string that overrides the current visit time. By default, SiteSpect uses the *current time* for each visit, but you can define the *exact time* of each visit by passing this optional field.
    - **newsession:**A Boolean that overrides the default logic that uses the User Session Timeout setting and starts a new visit. This makes sense if you want to have full control over the session from the application. For example, when testing native apps you might want to use this optional field to terminate the session on app close.

POST body JSON structure:

```

```

{   "visits": \[{     "AsmtCounted": \["VariationGroupID"\], "time": Unix epoch //optional, "newsession": boolean //optional,

    "Data": {       "MetricID": {         "Hits": number, //required         "ValueCapture": number //optional       }     }   }\] }

POST body JSON example:

POST [https://engine-336.sitespect.net](https://engine-336.sitespect.net/)

BODY

```

```

{   "visits": \[{     "AsmtCounted": \["88","89"\],     "Data": {       "151": {         "ValueCapture": 15         "Hits": 1       },       "152": {         "Hits": 2       }     }   }\] }

**Note:** The response of this call contains the same Assignment and Campaign Data that you receive from a GET call. It makes sense to leverage the response and to update the current assignment in your application.

#### Alternative Method for Triggering Metrics and Updating Counted State

Metrics in SiteSpect are often setup with URL triggers to capture visitor behavior on specific pages. Any Metric can be set to **Count User When Triggered**, which updates the counted state of the visit. A single call that flows through the SiteSpect proxy can update one or more Metrics according to the URL Trigger settings.

Since the Engine API calls are not proxied, but SiteSpect is the end point, this doesn't work. However, in the POST call, you can pass a URL query parameter with a value of the visitor's URL location. SiteSpect evaluates that against the URLs in the existing Metrics and updates hit and value capture data as well as counted state for the visit if you have enabled **Count User When Triggered** for a given Metric.

For example:

> [https://engine-336.sitespect.net/?url=/one&count=5](https://engine-336.sitespect.net/?url=/one&count=5)

The POST call above updates the hit count by 1 for any Metric that has a URL trigger regex that matches "/one". It would also capture a value of 5 if that Metric's value capture name is set to "count".

- [Get Started](https://doc.sitespect.com/knowledge/get-started?hsLang=en#main-content)

    - [SiteSpect Support](https://doc.sitespect.com/knowledge/get-started?hsLang=en#sitespect-support)
    - [Overview Information](https://doc.sitespect.com/knowledge/get-started?hsLang=en#overview-information)
    - [Intro to SiteSpect](https://doc.sitespect.com/knowledge/get-started?hsLang=en#intro-to-sitespect)
    - [Account Setup](https://doc.sitespect.com/knowledge/get-started?hsLang=en#account-setup)
    - [Artificial Intelligence](https://doc.sitespect.com/knowledge/get-started?hsLang=en#artificial-intelligence)
- [Dashboard](https://doc.sitespect.com/knowledge/dashboard?hsLang=en)
- [Build](https://doc.sitespect.com/knowledge/build?hsLang=en#main-content)

    - [Setting Up a Campaign](https://doc.sitespect.com/knowledge/build?hsLang=en#setting-up-a-campaign)
    - [Create a Client-Side Campaign](https://doc.sitespect.com/knowledge/build?hsLang=en#create-a-client-side-campaign)
    - [Create a Server-Side Campaign](https://doc.sitespect.com/knowledge/build?hsLang=en#create-a-server-side-campaign)
    - [Metrics](https://doc.sitespect.com/knowledge/build?hsLang=en#metrics)
    - [Audiences](https://doc.sitespect.com/knowledge/build?hsLang=en#audiences)
    - [Triggers](https://doc.sitespect.com/knowledge/build?hsLang=en#triggers)
    - [Variations](https://doc.sitespect.com/knowledge/build?hsLang=en#variations)
    - [Traffic Management](https://doc.sitespect.com/knowledge/build?hsLang=en#traffic-management)
    - [Preview](https://doc.sitespect.com/knowledge/build?hsLang=en#preview)
    - [Factors](https://doc.sitespect.com/knowledge/build?hsLang=en#factors)
    - [Advanced Settings](https://doc.sitespect.com/knowledge/build?hsLang=en#advanced-settings)
    - [Omnichannel](https://doc.sitespect.com/knowledge/build?hsLang=en#omnichannel)
    - [Regular Expressions (Regex)](https://doc.sitespect.com/knowledge/build?hsLang=en#regular-expressions-regex)
    - [WATTS](https://doc.sitespect.com/knowledge/build?hsLang=en#watts)
    - [Recommendations](https://doc.sitespect.com/knowledge/build?hsLang=en#recommendations)
- [Monitor](https://doc.sitespect.com/knowledge/monitor?hsLang=en)
- [Analyze](https://doc.sitespect.com/knowledge/analyze?hsLang=en#main-content)

    - [Data Export and Integration](https://doc.sitespect.com/knowledge/analyze?hsLang=en#data-export-and-integration)
    - [SiteSpect Reports](https://doc.sitespect.com/knowledge/analyze?hsLang=en#sitespect-reports)
- [Site](https://doc.sitespect.com/knowledge/site?hsLang=en#main-content)

    - [Tools](https://doc.sitespect.com/knowledge/site?hsLang=en#tools)
    - [Configuration](https://doc.sitespect.com/knowledge/site?hsLang=en#configuration)
- [Developers](https://doc.sitespect.com/knowledge/developers?hsLang=en#main-content)

    - [API Reference](https://doc.sitespect.com/knowledge/developers?hsLang=en#api-reference)
    - [Code Samples](https://doc.sitespect.com/knowledge/developers?hsLang=en#code-samples)
    - [Tips & Tricks](https://doc.sitespect.com/knowledge/developers?hsLang=en#tips-tricks)
- [Mobile](https://doc.sitespect.com/knowledge/mobile?hsLang=en)
- [Implementation, Deployment, and Security](https://doc.sitespect.com/knowledge/implementation-deployment-and-security?hsLang=en#main-content)

    - [How does SiteSpect work with CDNs?](https://doc.sitespect.com/knowledge/implementation-deployment-and-security?hsLang=en#how-does-sitespect-work-with-cdns)
    - [Single Tenant Implementations](https://doc.sitespect.com/knowledge/implementation-deployment-and-security?hsLang=en#single-tenant-implementations)
    - [Security Features](https://doc.sitespect.com/knowledge/implementation-deployment-and-security?hsLang=en#security-features)
    - [Deployment and Implementation Overview](https://doc.sitespect.com/knowledge/implementation-deployment-and-security?hsLang=en#deployment-and-implementation-overview)
    - [SiteSpect Engine & Admin API](https://doc.sitespect.com/knowledge/implementation-deployment-and-security?hsLang=en#sitespect-engine-admin-api)
- [Third-Party Integration](https://doc.sitespect.com/knowledge/third-party-integration?hsLang=en#main-content)

    - [Google](https://doc.sitespect.com/knowledge/third-party-integration?hsLang=en#google)
    - [Zuko](https://doc.sitespect.com/knowledge/third-party-integration?hsLang=en#zuko)
- [Troubleshooting](https://doc.sitespect.com/knowledge/troubleshooting?hsLang=en)
- [Releases](https://doc.sitespect.com/knowledge/releases?hsLang=en#main-content)

    - [Superfresh](https://doc.sitespect.com/knowledge/releases?hsLang=en#superfresh)
- [Feedback](https://doc.sitespect.com/knowledge/feedback?hsLang=en)

- [A/B Testing](https://www.sitespect.com/testing-and-experimentation/)
- [Personalization](https://www.sitespect.com/personalization-targeting/)
- [Recommendations](https://www.sitespect.com/recommendations/)

[![Monetate-Logo-Full-Color-1](https://doc.sitespect.com/hs-fs/hubfs/Monetate-Logo-Full-Color-1.png?width=200&height=29&name=Monetate-Logo-Full-Color-1.png "Monetate-Logo-Full-Color-1")](http://monetate.com)

<https://www.facebook.com/> <https://www.twitter.com/> <https://www.instagram.com/> <https://podcasts.apple.com/> [mailto:email@email.com](mailto:email@email.com)

Copyright © 2026, Monetate