Documentation
One line of code — and you get detailed analytics.
1. Installation
Paste this code on every page of your site (preferably before </body>). Your site number (data-id) is on the “Counter code” page in the dashboard.
<script async src="https://toprank.ge/c.js" data-id="your-id"></script>
2. Attributes
data-spa="1" | For single-page apps (React, Vue…): every navigation counts as a separate page view. |
data-privacy="1" | Turns off storing an anonymous id in the browser: the new/returning visitor split will not work. |
data-auto="0" | Turns off automatic tracking of outbound-link clicks and file downloads. |
3. Custom events
Call toprank('event', 'name') — the event appears on the “Events” tab and can be used for goals.
toprank('event', 'signup');
<button onclick="toprank('event','add_to_cart')">…</button>
4. What we measure
- Page views and visitors (a daily unique hash — no IP stored, no cookies).
- Visits (sessions split by 30 minutes of inactivity): duration, pages per visit, bounces, entry and exit pages.
- Sources: referrer, channel (search/social/other sites…), UTM tags.
- Geography: country (and city/region via Cloudflare headers), browser language.
- Technology: browser and version, operating system, device/brand/model, screen resolution.
- New and returning visitors (a random anonymous id in the browser’s localStorage; visitors cannot be linked across sites).
- Page title, time on page (visible time), scroll depth, load speed.
- Clicks on outbound links and file downloads; custom events.
- Time distribution: hours and days of week (Tbilisi time).
5. Content-Security-Policy
If your site has a strict CSP, allow our domain in script-src and img-src:
script-src https://toprank.ge; img-src https://toprank.ge;
6. Excluding your own visits
In your browser console run:
localStorage.setItem('tr_ignore', '1')