API & SDK Documentation

Track everything. Integrate in minutes.

Official @reviewo/tracker SDK for JavaScript and TypeScript with two channels — public browser tracking and server-to-server sales events — plus a documented REST API and ready-to-use examples.

13 event types JS · TS SDK <42ms p95
terminal
$
Getting Started

3 steps to tracking completo

1

Install the SDK

One line, any package manager — or drop in the JS loader (rv.js) in the browser.

2

Configure your keys

Publishable key for public tracking; secret key for sales events.

3

Start tracking

reviewo.track.event for navigation; reviewo.events for sales.

npm install @reviewo/tracker
tracking.ts
1import { reviewo } from '@reviewo/tracker'
2
3reviewo.configure({
4 baseURL: 'https://www.api.reviewo.com.br',
5 publishableKey: 'pk_rv_...'
6})
7
8// Rastreie qualquer evento
9await reviewo.track.event({
10 eventType: 'page_view',
11 eventData: {
12 url: '/produto/smart-tv',
13 title: 'Smart TV Samsung 65"'
14 }
15})
page_view rastreado —/produto/smart-tv(12ms)
Event Pipeline

12 eventos, um fluxo completo

From page_view to order_placed, each event connects to the next. The API automatically normalizes aliases.

page_view

URL visitada

product_view

Produto visto

add_to_cart

Adicionou ao carrinho

checkout_start

Iniciou checkout

checkout_profile

Buyer data

checkout_shipping

Shipping selection

checkout_payment

Pagamento

purchase

Pedido confirmado

abandoned_cart

Carrinho abandonado

form_submit

Form submitted

custom_event

Evento livre

Event Reference

Explore cada tipo de evento

POST /api/v1/public/track
page_view
{
  "clickId": "d8b947b875cc42cc...",
  "eventType": "page_view",
  "eventData": {
    "url": "/produto/smart-tv",
    "title": "Smart TV Samsung 65\"",
    "referrer": "https://google.com",
    "viewportWidth": 1920,
    "scrollDepth": 45
  }
}
200{ "ok": true, "eventId": "evt_..." }

page_view

Required fields: url

CampoTipoDescription
url*stringCanonical URL of the visited page
titlestringPage title
referrerstringCanonical referrer
viewportWidthintegerLargura do viewport em px
viewportHeightintegerAltura do viewport em px
scrollDepthnumberProfundidade de scroll (0-100%)
API Reference

SDK ou REST direto, you choose

Use the official SDK for quick integration or make direct REST calls. The same API powers both.

POST/api/v1/public/trackPublic

Public ingestion of navigation and checkout events (non-sensitive), identified by the publishable key.

Auth: Publishable key · metadata.siteKey

POST/api/v1/integration/eventsServer

Sensitive sales events — purchase, refund and cancel — always server-to-server, authenticated with the secret key and idempotent by orderId.

Auth: Secret key · x-api-key

Request Body — Campos compartilhados

CampoTipoDescription
eventTyperequiredstringPublic tracking event type (page_view, product_view, add_to_cart, checkout_*, abandoned_cart, custom_event).
eventDatarequiredobjectPayload do evento. Estrutura varia por eventType.
clickIdstringTracked Magic Link ID. Minimum 6 characters. Without it → organic event.
timestampstringISO 8601 (ex: 2025-07-31T04:41:10.060Z). Omitido → hora atual.
deviceIdstringIdentificador persistente do dispositivo.
metadataobjectFree-form integration data, stored as customData.

Campos de enriquecimento

Additional telemetry for server-side ingestion: geolocation, fingerprint, and visitor context

CampoTipoDescription
sessionIdstringSession ID sobrescrito manualmente.
ipstringIP de origem.
userAgentstringUser-Agent.
fingerprintstringFingerprint do cliente.
originstringpaid ou organic.
country / city / regionstringGeolocation to enrich ipLocation.
lat / lonnumberCoordenadas do visitante.
timezonestringTimezone do visitante (ex: America/Sao_Paulo).
Open interactive reference & SDKs

Full reference, OpenAPI spec, and SDKs — open, no login.

SDKs

11 plataformas, uma API

Use the official SDK or make direct REST calls. The same API powers both.

JavaScript
TypeScript
React
Next.js
React Native
Flutter
Swift
Kotlin
Python
Go
PHP
JavaScript
TypeScript
React
Next.js
React Native
Flutter
Swift
Kotlin
Python
Go
PHP

Tipagem completa

TypeScript-first com autocomplete no editor.

Docs interativas

Ready-to-use examples to copy and adapt.

Webhooks real-time

Receive conversion events in your backend.

Sandbox

Isolated environment for tests without affecting production.

Server-side ready

Endpoint direto com telemetria enriquecida.

<42ms p95

Ultra-low latency at edge locations.

190+ edge locations

CDN global via CloudFront.

Automatic alias

A API normaliza campos legados automaticamente.

Start Building

Integrate in minutes, scale to millions

Free API key, testing sandbox, and interactive documentation with ready-to-use examples.

$npm install @reviewo/tracker