Docs

Integrate, query and run InsightClickIQ

From the snippet to your own deployment. Everything here matches the product as it ships; examples use clickiq.example.com for your InsightClickIQ host.

Start in three steps

  1. Create a project in Sites & apps. It gets a public write key (ciq_…), like a Mixpanel token: it can only send events, and the project’s allowed origins decide which sites may use it.
  2. Paste the snippet into the <head> of every page, or install the npm package or a mobile SDK.
  3. Watch it arrive. The project’s install page shows the snippet and confirms the first event live, with the events of the last 24 hours.
The snippet
<script>
  !function(w,d,k,h){if(w.clickiq)return;var q=[],t=w.clickiq=function(){q.push(arguments)};t.q=q;
  var s=d.createElement("script");s.async=1;s.src=h+"/sdk/clickiq.js";s.setAttribute("data-key",k);
  s.setAttribute("data-host",h);d.head.appendChild(s)}(window,document,"ciq_YOUR_KEY","https://clickiq.example.com");
</script>
clickiq.example.com/projects · install
Northwind Outfitters project page with a green ‘Verified ✓ — the snippet is sending events’ banner (1,666 events in the last 24 hours), an Install panel with Script tag, npm and Track & identify tabs and the script snippet, plus the write key ‘ciq_demo_northwind’ and settings.
Install is one script tag, and the page confirms it live: ‘Verified ✓ — the snippet is sending events’. The settings show 100% session replay with inputs masked. Hosts in the snippet and the allowed origins were replaced with example domains.

Guides

Concepts

TermMeaning
OrganisationYour tenant. Every row carries it; row-level security in Postgres enforces it
ProjectOne website or app (or several sharing a funnel): a write key, allowed origins, timezone, conversion events, retention
EventOne of pageview, page_leave, click, rage_click, dead_click, form_submit, form_field, form_abandon, scroll, error, vital, identify, custom, session_start
Session30 minutes of inactivity ends one; a new UTM campaign starts one. Folded from the stream with counts, entry and exit, frustration (0–100) and whether it converted
PersonEvery anonymous id and the user id from identify, with traits usable as user.<trait> in any query. Queries count people across devices by default: a person’s browser, phone and server events count once
Flag and experimentA boolean or multivariate flag with targeting and a rollout; an experiment adds a goal event and reads $flag_exposure events
SurveyQuestions shown by the SDK; answers are Survey shown, Survey responded and Survey dismissed events on the session
Conversion eventsThe events that mark a session as converted (for example Order completed), set per project
QuerySpecThe typed query every chart, widget, alert, AI answer and MCP tool runs. The AI plans these; it never writes SQL

The console API

Every console endpoint answers the envelope {status: "SUCCESS"|"FAIL", data, error_message, error_code} and needs Authorization: Bearer <access token or API key>. Ingest endpoints are public and keyed by the write key. Scope is project_id (or omitted for all projects) and range (24h | 7d | 30d | 90d | 12m) or explicit from/to. Every rate, share and change in any answer is a fraction: 0.42 means 42%. The API publishes its OpenAPI docs at /docs.

Roles

RoleCan
adminProjects, keys, users, retention health
analystDashboards, saved queries, reports, segments, annotations, alerts, flags, surveys, exports, share links; run agents and investigations
viewerRead everything in the organisation, and comment on replays, reports and dashboards
auditorRead the audit trail

Need a hand with the integration?

Send us your event list or your app's screen map and we will review it before you ship.

Talk to an engineer