Use case
Web analytics for developers
Loogika is installed with one script tag and controlled from code. You send events with one function call, read every report over a REST API and connect AI tools through an MCP server.
How do you install it and send events?
<script src="https://app.loogika.com/api/script.js?siteId=YOUR_SITE_ID" defer></script>
window.loogika.event("export_started", { format: "csv" });
Route changes in a single-page app count as pageviews. The script waits 500 milliseconds after a route change, and data-debounce changes that.
Use data-skip-patterns to leave pages untracked and data-mask-patterns to hide IDs in paths. To test locally, use the same tag as in production.
What can you read over the API?
The API returns the same reports as the dashboard: overview, metrics, sessions, events, funnels, goals, errors, performance and retention. Send your key as a Bearer token.
curl "https://app.loogika.com/api/sites/12/overview?start_date=2026-11-01&end_date=2026-11-30" \
-H "Authorization: Bearer YOUR_API_KEY"
| Limit | Value |
|---|---|
| Burst | 50 requests, refilled at 5 per second |
| Daily quota | 25,000 requests on Business and 100,000 on Agency |
| Custom SQL | 60 requests per minute |
API keys are included in Business and Agency. See the API reference for every endpoint.
Can you query the raw events?
Yes. The Query page runs read-only ClickHouse SQL against one table, scoped_events, which holds every event for the site.
A result holds up to 1,000 rows, and a query stops after 10 seconds. You can save queries as cards on your own dashboards.
How do you connect an AI assistant?
Add https://app.loogika.com/api/mcp as a remote MCP server in your client. Sign in with an API key or with OAuth.
The server offers 42 tools. 26 read data, and 16 create, change or delete things such as goals, funnels and sites. See the MCP page for the list.
How do you track from a server or an app?
POST /api/track accepts pageviews and custom events from any code that can make an HTTP request.
Send the visitor's IP address and user agent with a key that has the ingest:write scope. Without that, every event looks like it came from your server.
How do you keep ad blockers from dropping data?
Load the script through a proxy on your own domain and turn on First-Party Proxy in Site Settings. The proxy must pass on the visitor's IP address. See the proxy guide.
Questions about Loogika for developers
Which plans include the API?
Business and Agency. Every plan can export reports as CSV from the dashboard.
Does Loogika work with single-page apps?
Yes. SPA navigation is on for new sites. Hash routes that start with #/ count as paths.
Can you report errors you catch yourself?
Yes. Call window.loogika.error(err, { step: "checkout" }). The same error is sent at most once every 60 seconds.
Where is the documentation?
The docs cover the script, events, settings and the full API reference.
Related features
Other use cases
Add Loogika to your next build
The free trial lasts 7 days. You add one script tag to get started.
Start your free trial