Public HTTP API

GET /audiences/public/api/profiles/{analytics_visitor_id}/audiences/check/

Check that user belongs to specific audience

Checks if the user belongs to specific audience.

Audience ID can be found in Audience Manager > Audiences tab. Then select an audience. Its ID is displayed in audience details (below the name).

Parameters:
  • analytics_visitor_id (string) – Analytics Visitor ID (previously Piwik Visitor ID).
Query Parameters:
 
  • website_id (string) – App ID (previously Website ID).
  • audience_id (string) – ID of the audience.
Status Codes:
POST /audiences/tracker/attributes/

Create or update user attributes

Creates or updates user custom attributes.

Any attribute can be updated this way whether it is on the attribute whitelist or not.

You can send data in batches - multiple profiles in one request and multiple attributes in the profile. All of the data in one batch request should be related to websites that belong to the same organization.

Each item must have at least one identifier:

  • user_id
  • email
  • analytics_visitor_id
  • device_id
Status Codes:
GET /audiences/public/api/profiles/{analytics_visitor_id}/attributes/

Get user profile attributes

Returns a list of user profile attributes.

In order to secure the PII data, no attribute is returned by default. You need to put each attribute you want to access on the attribute whitelist before it’ll be returned by this endpoint. In order to do that, go to Audience Manager > Attributes tab and enable attribute for the public API access. It is your responsibility to make sure no user PII data will be available via API.

Parameters:
  • analytics_visitor_id (string) – Analytics Visitor ID (previously Piwik Visitor ID).
Query Parameters:
 
  • website_id (string) – App ID (previously Website ID).
Status Codes:
GET /audiences/public/api/profiles/{analytics_visitor_id}/audiences/

Get audiences user belongs to

Returns list of audience IDs user belongs to.

Audience ID can be found in Audience Manager > Audiences tab. Then select an audience. Its ID is displayed in audience details (below the name).

Parameters:
  • analytics_visitor_id (string) – Analytics Visitor ID (previously Piwik Visitor ID).
Query Parameters:
 
  • website_id (string) – App ID (previously Website ID).
Status Codes: