Essential Nigeria Analytics

Track website usage across multiple domains with our powerful Laravel-based API. No third-party trackers, complete privacy, unlimited possibilities.

View Documentation
99.9%
Uptime
< 50ms
Response Time
JWT
Secured
GDPR
Compliant

Analytics Dashboard

Page Views

147,302
↗ 12% from last month

Unique Visitors

28,547
↗ 8% from last month

Session Duration

4m 32s
↗ 15% from last month

Powerful Features

Everything you need to understand your website traffic without compromising user privacy

Privacy First

No cookies, no third-party trackers. GDPR compliant analytics that respects user privacy while delivering actionable insights.

Lightning Fast

Built with Laravel for performance. Sub-50ms response times and real-time data processing for instant insights.

Multi-Domain

Track multiple websites from a single dashboard. Perfect for agencies and businesses with diverse web properties.

JWT Secured

Enterprise-grade security with JWT authentication. Your data stays protected with industry-standard encryption.

Developer Friendly

RESTful API with comprehensive documentation. Easy integration with any platform or framework you're using.

Real-time Analytics

Get instant insights with real-time tracking. Monitor page views, clicks, sessions, and geolocation data as it happens.

Perfect For Your Websites

Track analytics across all your domains from one powerful dashboard

example.com
47,382 views
Main business website
edirect.ng
28,547 views
Directory platform
essentialnews.ng
35,291 views
News website
estore.example.com
19,847 views
E-commerce store
ehotel.example.com
12,653 views
Hotel booking
Your domain here
+ Add Site
Start tracking today

API DOCUMENTATION

This is a plug-and-play analytics tracking system that works for any website. No complex setup. Just copy-paste and start tracking page views, clicks, and session time with detailed analytics.

Features

  • Simple setup
  • Auto-tracks every page view and click
  • Tracks how long users stay on each page
  • Breakdowns by country, traffic, top pages
  • API access to full analytics
  • No dependencies – pure Vanilla JavaScript

🧩 How It Works

  1. 1 Register your website
  2. 2 Get a unique api_key
  3. 3 Paste a tracking script on your site - Preferably your base or index layout
  4. 4 Done! Analytics starts flowing ✨

🛠️ Step 1: Register Your Website

Make a POST request to register your site.

➤ Endpoint:

POST https://analytics.essentialnews.ng/api/sites

Sample Request (via Postman or Terminal):

curl -X POST https://analytics.essentialnews.ng/api/sites \
  -H "Content-Type: application/json" \
  -d '{
    "domain": "https://yourwebsite.com",
    "name": "My Website"
  }'

Response:

{
  "site": {
    "api_key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
  },
  "tracking_code": "<script src=\"https://analytics.essentialnews.ng/api/process.js?api_key=xxxxxxxx\"></script>"
}

🔧 Step 2: Add the Script to Every Page

Paste the script tag just before </body> or in the <head> of your site.

HTML Example:

<!-- Add this to all your pages -->
<script src="https://analytics.essentialnews.ng/api/process.js?api_key=xxxxxxxx"></script>

Pro Tip: If your site uses a layout template (e.g. Laravel Blade, React layout, etc.), paste it once in the layout to apply everywhere.

What It Tracks Automatically

Event Trigger Extra Info Sent
pageview On page load URL, browser, IP
click On any click element_id (if exists)
session_duration On unload Seconds spent on page

No extra setup. Just the script = full tracking. 🚀

Optional: Track Custom Events

Want to track something manually? Use:

window.tracker?.track('click', { element_id: 'my-button' });
window.tracker?.track('pageview', { session_duration: 90 });

Step 3: View Your Analytics

To get a full report of views, clicks, top pages, and visitors:

➤ Endpoint:

GET https://analytics.essentialnews.ng/api/analytics?api_key=xxxxxxxx

It returns:

  • • Daily breakdowns (today, week, month)
  • • Top countries
  • • Top pages
  • • Unique visitors

Use this data to build a dashboard or show insights.

Want to Inspect Events?

Open DevTools in your browser:

  1. 1. Go to Network → Fetch/XHR
  2. 2. You'll see calls to /api/track
  3. 3. You're live! 🔴

Common Errors

Issue Fix
Invalid API key Ensure your script tag has the correct key
Validation failed Missing required fields or wrong format
page_url mismatch Only pages from the registered domain are accepted

Safety Notes

  • • Your site must be accessible via HTTPS (for accurate IP/location).
  • • Do not expose your analytics API key in public if you're tracking sensitive data.
  • • CORS must be properly configured if using across origins.

Quick Summary

  1. 1 Register your site to get an API key
  2. 2 Paste the script in your site layout
  3. 3 Done! Tracking is automatic
  4. 4 View analytics via the /analytics endpoint

Made with ❤️ using Laravel, JavaScript, and common sense.

Need help? Open an issue or contact the developer - webmasterjdd@gmail.com.