Everything you need to understand your website traffic without compromising user privacy
No cookies, no third-party trackers. GDPR compliant analytics that respects user privacy while delivering actionable insights.
Built with Laravel for performance. Sub-50ms response times and real-time data processing for instant insights.
Track multiple websites from a single dashboard. Perfect for agencies and businesses with diverse web properties.
Enterprise-grade security with JWT authentication. Your data stays protected with industry-standard encryption.
RESTful API with comprehensive documentation. Easy integration with any platform or framework you're using.
Get instant insights with real-time tracking. Monitor page views, clicks, sessions, and geolocation data as it happens.
Track analytics across all your domains from one powerful dashboard
Everything you need to integrate our privacy-first analytics into your websites
The Analytics API tracks and stores real-time usage data across your websites. Built with Laravel and secured by JWT authentication, this API lets you collect and retrieve data like page views, clicks, session duration, and visitor geolocation — without relying on third-party tools like Google Analytics.
// Register a new user
curl -X POST https://analytics.essentialnews.ng/api/register \
-H "Content-Type: application/json" \
-d '{
"name": "Your Name",
"email": "your.email@example.com",
"password": "YourPassword123",
"password_confirmation": "YourPassword123",
"marketing_consent": false
}'
📩 Check your email for a verification link (check spam/junk too).
// Email Verification
GET https://analytics.essentialnews.ng/api/verify-email?token=YOUR_VERIFICATION_TOKEN
// Register a new website/domain
curl -X POST https://analytics.essentialnews.ng/api/sites \
-H "Authorization: Bearer your-jwt-token-here" \
-H "Content-Type: application/json" \
-d '{
"domain": "edirect.example.com",
"name": "Edirect"
}'
// Option 1: Use Hosted Script
<script src="https://analytics.essentialnews.ng/js/analytics.js"></script>
// Option 2: Host It Yourself
(function () {
const apiUrl = 'https://analytics.essentialnews.ng/api';
const jwtToken = 'YOUR_JWT_TOKEN';
const domain = 'YOUR_WEBSITE_DOMAIN';
function trackPageView(sessionDuration = null) {
fetch(`${apiUrl}/track/pageview`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${jwtToken}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
domain: domain,
page_url: window.location.href,
user_agent: navigator.userAgent,
session_duration: sessionDuration,
}),
});
}
let pageLoadTime = Date.now();
window.addEventListener('load', () => trackPageView());
window.addEventListener('beforeunload', () => {
const sessionDuration = Date.now() - pageLoadTime;
trackPageView(sessionDuration);
});
})();
// Get page view analytics
curl -X GET https://analytics.essentialnews.ng/api/analytics/pageviews \
-H "Authorization: Bearer your-jwt-token-here"
| Method | Endpoint | Description |
|---|---|---|
| POST | /register | Register a new user |
| POST | /login | Log in and receive JWT token |
| GET | /verify-email | Verify email with token |
| POST | /sites | Register a website/domain |
| POST | /track/pageview | Track a page view |
| POST | /track/click | Track click on elements |
| GET | /analytics/pageviews | Get total page views |
| GET | /analytics/geolocation | Get visitor geolocation |