Clear campaign results
TrackAny.Click — Documentation
Invest in the campaigns and customer journeys that create value.
Last reviewed: 11 October 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 public key and the exact script URL from TrackAny.Click → Installation. Place the script on the pages you want to measure and keep data-consent=denied until analytics consent is granted. The collector URL may be the shared connect.trackany.click host or a verified tracking domain shown in your workspace. data-spa=true records the first view and History API navigation after consent; data-track-outbound=true records external link clicks.
Choose one consent path: enable the TrackAny.Click-managed banner in the workspace and add data-consent-banner=managed, or connect your existing consent system with the consent command below. Do not show both consent dialogs.
data-web-vitals=true adds consented Core Web Vitals. The tracker can observe future Meta Pixel and Google dataLayer/gtag calls after analytics consent while leaving those tags intact; set data-provider-events=false to disable this bridge. Calls made before the tracker loads are not recovered.
<script async src="https://connect.trackany.click/v1/t.js"
data-project="YOUR_PUBLIC_PROJECT_KEY"
data-endpoint="https://connect.trackany.click"
data-consent="denied"
data-consent-banner="managed"
data-spa="true"></script>Consent and data minimization
In normal mode, before analytics consent, the tracker does not create measurement identifiers or send measurement events. The managed banner may read or save the consent choice itself. Withdrawing consent clears local visitor and session state and stops future SDK events. It does not delete events already stored by the service; use the project's data request process for that.
Keep names, email addresses, secrets and other personal information out of page paths, campaign labels and custom event properties. Page URLs lose query strings and fragments; the tracker does not fingerprint visitors.
Use the TrackAny.Click consent banner
In TrackAny.Click → Installation → Consent, enable the banner, choose the supported languages, complete every visible string and add an HTTPS privacy-policy URL for each selected language. Save the configuration, then use the project snippet with data-consent-banner=managed on the intended pages. The browser requests the configuration through the allowed-origin collector endpoint; an unconfigured or unavailable banner leaves measurement denied.
The banner records accept or reject for the public project key and configuration revision. A new revision asks again. Language follows the page language or browser preferences, falling back to the configured default. Review the rendered banner and withdrawal path on the actual website before collecting traffic.
Developer mode collects events even after rejection. Use it only for a controlled test and turn it off for customer traffic.
Connect an existing consent system
When your website already has a consent manager, omit data-consent-banner=managed. Keep data-consent=denied in the script. In the manager's analytics-consent callback call window.trackany("consent", "granted"); on withdrawal call window.trackany("consent", "denied"). The queue-safe stub below also accepts a decision before the tracker finishes loading.
Read the current analytics choice when the page starts and forward changes as they occur. With data-spa=true, the first consented page view is automatic; otherwise send window.trackany("pageview") after consent. The managed banner does not expose a separate callback API; use the consent command for an external manager.
<script>
window.trackany = window.trackany || function () {
(window.trackany.q = window.trackany.q || []).push(arguments);
};
// Call these from your website's analytics-consent callbacks:
function onAnalyticsConsentGranted() { window.trackany("consent", "granted"); }
function onAnalyticsConsentWithdrawn() { window.trackany("consent", "denied"); }
</script>
<script async src="https://connect.trackany.click/v1/t.js"
data-project="YOUR_PUBLIC_PROJECT_KEY"
data-endpoint="https://connect.trackany.click"
data-consent="denied" data-spa="true"></script>Measure first actions and outcomes
Define the first meaningful action and the later business outcome as separate events. In the visitor-path report, each measured session belongs to its first configured action or to the no-action branch.
For an appointment funnel, a form lead is not a confirmed booking: send appointment_booked or appointment_created from a trusted source after the booking is confirmed in the same session. Review the report's coverage and event window before comparing paths.
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.