Documentation

Quick start

1

Create an account

Sign in at app.logly.uk with Google or GitHub. No credit card required.

2

Add your site

Go to Settings → Add a site. Enter a name and domain (e.g. myblog.com). You'll get a site ID.

3

Add the snippet

Paste this inside <head> on every page you want to track, replacing YOUR-SITE-ID with the ID from the previous step:

<script src="https://logly.uk/p.js?s=YOUR-SITE-ID" data-site="YOUR-SITE-ID" async></script>

That's it. Stats appear in your dashboard within a minute.

Optional: mention Logly in your privacy policy with our ready-made paragraph.

Using a strict Content-Security-Policy? Allow Logly's domain in two directives, or events are blocked silently and your dashboard stays empty:

script-src https://logly.uk; img-src https://logly.uk

Pageviews are sent as an image beacon to logly.uk/_e, so img-src is the one that matters (connect-src is not used). A strict style-src 'self' only produces a few harmless console warnings — tracking still works.

On WordPress? You can skip the snippet — install the Logly WordPress plugin instead and just enter your site ID. It is not in the WordPress.org directory yet, so download it from its GitHub repository.

The script is under 1 KB compressed (the size your visitors download), non-render-blocking, and has no impact on your Lighthouse or Core Web Vitals scores.

How it works

Session tracking

Logly identifies sessions using a daily-rotating hash of a truncated IP prefix and browser user-agent. The hash changes every day, so the same visitor on consecutive days counts as two sessions. Pages viewed within 30 minutes of each other belong to the same session. No cookie is set and no personal data is stored.

Active time on page

The tracker uses the Page Visibility API: the timer pauses when your tab is hidden (minimised, switched away, or in a background tab) and resumes when it's visible again. The time you see in the dashboard is the time the visitor was actively looking at your page.

Ad blocker bypass

Requests are routed through logly.uk/e, a first-party endpoint that is not on any block list. This allows Logly to measure the portion of your audience using Brave Shields, uBlock Origin, or similar tools.

Dashboard

MetricDefinition
SessionsVisits in the selected period. A visit ends after 30 minutes without activity
PageviewsTotal page loads tracked
Avg. time per visitMean active time across visits
Bounce rateSessions with a single pageview
PagesPath without the query string, so /?utm_source=x counts as /. WordPress ?p= and ?page_id= are kept
SourcesThe referring site. With no referrer, the utm_source or ref parameter of the link; with neither, Direct

Use the date picker (7 / 30 / 90 days) to change the time range. Switch between sites using the site selector in the header.

Data export (CSV)

You can download your analytics data as a CSV file at any time. Set the date range in the dashboard, then click Export ↓ in the top-right header and choose one of three types:

TypeRowsColumns
Daily statsOne per daydate, pageviews, sessions, visitors, avg_duration_s, bounce_rate
SessionsOne per visit (max 100 k)started_at, ended_at, duration_s, pages_visited, entry_page, exit_page, referrer, country, device, browser, os
EventsOne per custom event (max 100 k)ts, name, country, device

No personal identifiers or IP addresses. Country is ISO 3166-1 alpha-2 (ES, US…). Timestamps are ISO 8601 UTC. The exported date range matches the picker selection.

The same data is available programmatically via the REST API.

Custom events

Pageviews tell you who showed up. Events tell you what they did. Once p.js is on your site, the tracker exposes one function:

window.logly('event', 'event_name');

That's the whole API — no SDK, no init step. The event name is capped at 100 characters and should be lowercase snake_case. Events appear in your dashboard's Events panel within seconds and can be used as steps in funnels.

Example 1 — CTA click

document.querySelector('.btn-hero').addEventListener('click', () => { window.logly('event', 'cta_hero_click'); });

Example 2 — Signup completed (after success)

form.addEventListener('submit', async (e) => { e.preventDefault(); const ok = await submitForm(form); if (ok) window.logly('event', 'signup_completed'); });

Fire on success, not on attempt — otherwise you inflate the count with people who never finished.

Example 3 — Plan selection (one event per plan)

starterBtn.addEventListener('click', () => window.logly('event', 'plan_selected_starter')); proBtn.addEventListener('click', () => window.logly('event', 'plan_selected_pro')); businessBtn.addEventListener('click', () => window.logly('event', 'plan_selected_business'));

One event per plan, not a single plan_selected with the plan in a payload — Logly stores event names verbatim and you'll want each plan ranked separately in the dashboard.

For advanced trigger patterns — scroll-into-view, scroll depth, dwell time — see the events cookbook on the blog.

AI assistants (MCP)

Connect Logly to Claude, Cursor and other AI assistants with the Logly MCP server — ask about your traffic, funnels and real-time visitors in plain language.

Plans and limits

PlanPageviews / monthSitesData retention
Free10,00011 month
Starter100,00056 months
Pro1,000,000Unlimited2 years
Business10,000,000Unlimited5 years

Pageviews from all your sites count towards the same monthly bucket.

Analytics by Logly badge

The Free plan shows an "Analytics by Logly.uk" badge automatically on tracked pages. Starter and higher plans can hide it from the Settings page.

Text for your privacy policy

Your visitors may want to know what your analytics collect. Copy this paragraph into your privacy policy as it is, or adapt it. It describes exactly what Logly records; it is not legal advice, and your policy remains your responsibility.

We use Logly to understand how visitors use this website. Logly does not use cookies and does not store IP addresses or any other information that identifies you. It records the page you visit, the website that sent you here, how long the page stays open in front of you, your country (worked out from your IP address, which is then discarded), and your type of device, browser and operating system. Pages you view on the same day are grouped into a visit without cookies; this grouping resets every day, so you cannot be followed from one day to the next or across other websites. The data is stored in the European Union and is never sold or shared with advertisers.

If you track custom events, add a sentence saying which actions you count (for example, “clicks on the sign-up button”).

Invite codes

If you have an invitation code (EARLY-XXXXX or STARTER-XXXXX), redeem it in Settings to unlock the corresponding plan at early access pricing.

Support

Use the chat widget in the bottom-right corner of this page — it's the fastest way to get help.

Troubleshooting

Why your analytics code disappears after publishing — if you build your site with a desktop program (WebSite X5, Mobirise, Xara…), publishing overwrites your pages and deletes any snippet pasted by hand. Where to put it so it survives.