Clear campaign results
TrackAny.Click — Documentation
Invest in the campaigns and customer journeys that create value.
Last reviewed: 9 September 2026
Getting started
1. Create and verify one Cloud account. 2. Select or create the organization that owns the integration. 3. Create a project for the website, shop or brand whose data must stay together. 4. Open the product workspace and confirm that it is enabled before copying credentials or sending production traffic.
That is the complete account setup. The remaining sections are implementation guides. Credentials are always project-scoped; server secrets must never be placed in browser code, public repositories or client-side environment variables.
Before you integrate
TrackAny.Click collection is activated per customer project. Start production traffic only when the project workspace displays a public key, the installation snippet and an active collector URL. Prepared URLs or a script copied from another project do not activate collection.
Public and secret project keys
The public pub_tac_ key belongs in the browser and is restricted to the active domains of its project. The sec_tac_ key is shown once when the project is created and belongs only in a server-side secret manager. It authenticates server events and identify calls.
If the secret key was not stored, do not substitute the public key or expose a server key in the browser. Request a controlled replacement before integrating server events; self-service secret-key rotation is not currently available.
Install the browser tracker
Copy the project-specific snippet from TrackAny.Click → Installation. It loads https://trackany.click/v1/t.js, sends to https://connect.trackany.click and starts with consent denied. data-spa=true adds initial and History API page views; omit it for traditional page loads or send pageview yourself.
<script>
window.trackany = window.trackany || function () {
(window.trackany.q = window.trackany.q || []).push(arguments);
};
</script>
<script async
src="https://trackany.click/v1/t.js"
data-project="PUBLIC_PROJECT_KEY"
data-consent="denied"
data-spa="true">
</script>Connect consent correctly
Before consent the tracker creates no identifiers, touches no persistent storage and sends no events. Call consent=granted only after the site's consent manager authorizes analytics. Call consent=denied on withdrawal; this clears TrackAny.Click's local state and stops new events, but it is not a server-side deletion request.
Avoid personal information in URLs, UTM values and custom properties. Page queries and fragments are removed, referrers are reduced, and the SDK does not fingerprint users.
Track page views, leads and conversions
Use lowercase snake_case event names. Mark real goals with conversion=true and pass value and a three-letter currency together when the event has a monetary value. Browser calls automatically carry the consent-bound visitor, session and attribution context.
Use one event for one business fact. Do not report the same purchase from browser and server unless both events intentionally represent different facts.
window.trackany("consent", "granted");
window.trackany("pageview");
window.trackany(
"event",
"qualified_lead",
{ form: "demo_request" },
{ conversion: true }
);Send a trusted server event
POST JSON to /v1/events with the secret key as a Bearer token. Server events can include contactId or externalId and are reported separately from browser-trust events. Keep eventId stable when retrying the same event: identical content is deduplicated, while changed content under the same ID returns HTTP 409 event_id_conflict.
curl --request POST "https://connect.trackany.click/v1/events" \
--header "Authorization: Bearer $TRACKANY_SECRET_KEY" \
--header "Content-Type: application/json" \
--data '{
"eventId": "evt_01JZ8J2K9M7P4Q6R8S1T3V5W7X",
"event": "purchase",
"timestamp": "2026-09-08T17:00:00Z",
"contactId": "crm_123",
"value": 49.9,
"currency": "USD",
"conversion": true,
"properties": {
"plan": "pro"
}
}'Connect a visitor to your system
After a form submission or sign-in, read the consented visitorId from window.trackany.getContext() and send it from your backend to POST /v1/identify with contactId, externalId or both. This endpoint requires the secret key; public browser keys are rejected.
curl --request POST "https://connect.trackany.click/v1/identify" \
--header "Authorization: Bearer $TRACKANY_SECRET_KEY" \
--header "Content-Type: application/json" \
--data '{
"visitorId": "vis_01JZ8J2K9M7P4Q6R8S1T3V5W7X",
"contactId": "crm_123"
}'Choose an event model
Define a small vocabulary before implementation, for example page_view → form_submitted → qualified_lead → purchase. Keep acquisition activity and later customer outcomes as distinct events so reports can show the observed order and trust source.
Preserve campaign attribution
Use consistent utm_source, utm_medium, utm_campaign and stable provider identifiers such as utm_id, utm_adgroup_id and utm_ad_id. TrackAny.Click retains first touch, current session touch and last non-direct touch separately; campaign names alone are not reliable join keys.
Batching and outcomes
POST 1–100 events to /v1/events/batch when a server process has several independent facts. The service validates the complete batch first and can return HTTP 207 with per-event results if only some writes succeed. Keep each event ID and payload for safe retry.
Read journeys and handle failures
HTTP 202 means the event was accepted. Handle 400 as a contract or timestamp error, 401 as an invalid project key, 402 as quota or credits required, 403 as an origin restriction, 409 as event-ID reuse with changed content and 429 as rate limiting. Retry transient failures with the unchanged event ID and payload.
Journey and funnel reports are bounded views, not an identity graph: they expose coverage and truncation, keep currencies and trust sources separate, and do not claim cross-device certainty.
Markdown and llms.txt contain the same integration contracts for developers, coding assistants and automated documentation tools.