Trait Analytics API

The Traits Analytics API allows you to send and work with visitor traits and behavioral data in Tango.ad. This data can be used to better understand visitor behavior and support analytics, segmentation, and personalization.

Note: API endpoints, parameters, authentication methods, and response formats should be verified against the current Tango.ad API specification before publishing this article.


What Is the Traits Analytics API?

The Traits Analytics API provides a way for your application or ecommerce platform to communicate visitor-related data with Tango.ad.

Traits can represent information about a visitor's behavior or interaction with your website. This information can help Tango.ad understand visitor interests and engagement.

Examples of data that may be used as traits include:

  • Product or category interactions
  • Visitor interests
  • Engagement signals
  • Custom visitor attributes
  • Other behavioral information supported by your Tango.ad setup

When to Use the Traits Analytics API

Use the Traits Analytics API when you need to send visitor or behavioral information to Tango.ad programmatically.

For example, you may use it when:

  • Your website tracks visitor behavior outside of the standard Tango.ad tracking flow.
  • You have custom events that need to be connected with visitor traits.
  • Your application needs to send additional visitor information to Tango.ad.
  • You want to integrate your own system with Tango.ad analytics.

Before You Start

Before using the API, make sure you have:

  1. An active Tango.ad account.
  2. Access to the required API credentials.
  3. The necessary permissions to use the API.
  4. The required visitor or trait data.
  5. An application or server that can send API requests.

Keep API credentials private and do not expose them in frontend code or public repositories.


Sending Trait Data

When sending data to Tango.ad, your request must follow the format required by the specific API endpoint.

Depending on the endpoint, the request may require information such as:

  • Visitor identifier
  • Trait name
  • Trait value
  • Event or interaction information
  • Timestamp
  • Additional metadata

Example structure:

{
  "visitorId": "VISITOR_ID",
  "trait": "TRAIT_NAME",
  "value": "TRAIT_VALUE"
}

Important: The example above is for illustration only. Replace it with the exact request format supported by the current Tango.ad API before publishing.


Trait Analytics and Visitor Behavior

Traits can be used as signals describing how visitors interact with a website.

For example, visitor activity may indicate different levels of interest in a product, category, or brand. Tango.ad can use these signals together with other analytics and targeting data to understand visitor behavior.

For information about configuring how events contribute to analytics and targeting, see Traits Mapping.


API Response

After sending a request, the API returns a response indicating whether the request was successfully processed.

When troubleshooting an integration, check:

  • HTTP status code
  • Response body
  • Error message
  • Request parameters
  • Authentication information

Error Handling

If a request fails, check the API response for information about the problem.

Common causes include:

  • Invalid authentication credentials
  • Missing required fields
  • Incorrect request format
  • Invalid visitor identifier
  • Invalid trait data
  • Insufficient permissions
  • Incorrect API endpoint

Correct the request based on the returned error before trying again.


Best Practices

When integrating the Traits Analytics API:

  • Keep API credentials secure.
  • Send only the data required by the API.
  • Validate trait data before sending it.
  • Use the correct visitor identifier consistently.
  • Handle unsuccessful API requests in your integration.
  • Log API errors during development and troubleshooting.
  • Follow the latest Tango.ad API specification.

Troubleshooting

Trait data is not appearing

Verify that:

  1. The API request was successfully processed.
  2. The correct visitor identifier was used.
  3. The trait name and value follow the required format.
  4. Your account has the necessary API permissions.

Authentication failed

Check that your API credentials are valid and have access to the requested API.

The API returns an invalid request error

Review the request URL, HTTP method, headers, required parameters, and request body against the current API specification.


Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.