CRISP partners

Website traffic

Optional visitor and page-view metrics for your organization’s websites.

Your backend submits POST /v1/traffic/page-views after traffic analytics is enabled. Configure the website project with CRISP first. projectSlug selects one of your organization’s configured websites. Your API key identifies your organization. Changing your organization’s display name or slug does not require changing an independent website project identifier. Do not assume those namespaces are interchangeable.

Use the configured server client. The HTTP example omits signing headers. Substitute actual sanitized event values; never reuse this illustrative event ID for different views.

const result = await crisp.recordPageView({
  eventId: '40d61b87-15dc-4e21-b685-108b1682e5c8',
  projectSlug: 'main-site',
  visitorToken: 'example_daily_pseudonymous_token_123456789',
  pagePath: '/markets',
  referrerHost: 'example.com',
  countryCode: 'MY',
  isLanding: true,
});

Generate a new UUID per real page view and retain it on retries. 202 returns whether the event was recorded; duplicates are safely deduplicated. No Idempotency-Key is required. This route uses event ID replay protection.

The token is pseudonymous (32–128 letters/digits/underscore/hyphen), not an email, wallet address, IP or long-lived identity. Derive country at your trusted edge; send a two-letter code or null. pagePath excludes query/fragment and personal data. Send only a referrer hostname or null, only on landing events. Unknown fields are rejected. Never forward full raw URLs or IP addresses to CRISP.

Protect your own browser-to-backend collector from abuse; a traffic key belongs on the server. This is essential traffic analytics, not an assertion of advanced bot filtering or exact cross-device people counts. Metrics appear in the Partner dashboard; portal session APIs are not part of the HMAC integration surface.

CRISP Partner Documentation