Keep Your Shop's Data on Your Own Domain — Self-Hosted Matomo for OpenCart
Your data never leaves your own domain.
Your small data never becomes someone else's big data.
1. Every visit, every order — where does it actually go?
Install Google Analytics 4 and every visitor on your shop opens a connection to a third party. You get a dashboard; they get the raw stream. You cannot see the underlying records, you cannot export the visit-level detail, and the numbers you can see are subject to sampling and thresholding once your traffic grows.
Then there is the delivery problem nobody mentions: privacy tools straight out of the box block the usual analytics URLs. We verified against the public EasyPrivacy list — it blocks /matomo.js, /matomo.php, ://matomo. and ://piwik., with no third-party condition attached. Those visitors are simply not counted, so your traffic and conversion numbers come back lower than reality.
And there is the durability problem. Universal Analytics processed its last standard property hit in 2023. Sixteen years of history, gone on the vendor's schedule, not yours.
2. What "install Matomo inside your domain" actually means
Matomo is the open-source analytics platform (originally Piwik, GPL-licensed, actively maintained — we run 5.14). Instead of pointing your shop at somebody else's cloud, we install it on your hosting and let it answer on your subdomain, for example:
https://stats.yourshop.com
Then everything stays inside your infrastructure:
- tracking requests go from your shop to your own server — one host, one relationship
- the cookie it sets is a first-party cookie, not a third-party one
- the raw visit log lands in your MySQL database, on your hosting account
- no analytics data is handed to any external processor
Nothing about this is exotic. If your shop already runs on cPanel-style hosting with MySQL, you already own everything it needs.
3. The benefits — the honest list
1. Your data stays yours.
The full, unaggregated record sits in your own database. Nobody else can mine it, resell it, or train anything on it. This is the whole point: your small data never becomes someone else's big data.
2. Your numbers stop lying to you.
Self-hosting alone is not enough — the default Matomo file names are on the block lists too. We rename the tracker endpoints to neutral names (for example mtrk.js / mtrk.php) and serve them from a neutral host (stats. rather than matomo. / piwik.). We tested those exact strings against EasyPrivacy: zero hits. More of your real traffic shows up in the report, because fewer browsers refuse to load the tracker.
3. Full resolution, not samples.
No sampling, no thresholds, no "data has been withheld". You can open an individual visit and see the pages, the entry point, the device, the timing — the actual record, not an estimate.
4. E-commerce numbers that match your orders.
Matomo's e-commerce tracking records revenue, items, shipping and discounts per order. We deployed it on a live OpenCart shop and reconciled it order by order against the real admin data — two real orders: HK$621 received against a HK$760 subtotal with a HK$139 discount, and another with HK$28 shipping. It matched.
5. Cost you can predict.
Matomo software is free. You pay for hosting you already own — no per-hit fee, no per-user seat, no "premium property" tier. Traffic spikes cost you nothing extra; traffic growth does not silently change the bill.
6. Privacy and compliance you can actually describe.
You decide the retention window, you can anonymise IPs, and no customer data is transferred to a third country on the analytics side. If a customer asks where their data goes, there is a one-sentence answer that happens to be true.
7. It survives vendor policy changes.
Analytics history on your own server keeps working when a vendor changes its product model, because nobody can switch it off but you.
8. Speed.
A tracker served from a nearby host (Hong Kong hosting for Hong Kong shoppers) is one less long haul per page view.
9. It connects to the rest of your shop.
Custom dimensions for brand, supplier or customer segment; segments you can join against your own order table; the same data feed that powers on-site personalisation modules. Google will not give you the row-level data to build that.
4. What an install actually involves
- Create a subdomain (
stats.yourshop.com) and a MySQL database on your existing hosting. - Install Matomo 5.x, run the installer, set the timezone and currency (HKD / Asia/Hong_Kong).
- Turn on E-commerce tracking for the site — it is off by default; this is the single most common reason a shop sees "0 conversions".
- Add the tracking code to the shop, and rename the tracker endpoints to neutral file names so ad-blockers leave them alone.
- Add the order-success snippet (on OpenCart: an OCMOD/vQmod modification) so every completed order reports its revenue, items and shipping.
- Enable scheduled archiving and set up a database backup.
- Verify with a real order, not a test order — we reconcile the reported revenue against the admin order list.
5. A real example: mrpen.hk
We moved a live Hong Kong pen shop from a shared analytics instance onto a first-party install:
- Matomo 5.14 running at
stats.mrpen.hk, its own database, its own history - tracker renamed to
mtrk.js/mtrk.phpso the block lists do not match it - shop snippet repointed from the third-party host to the shop's own subdomain
- e-commerce tracking deployed and verified against five real orders
- the full data set backed up before anything was changed (a 43 MB database dump plus a file tarball)
Result: a live visitor's session appeared in the shop's own database seconds after the switch, with page-level detail and a real country/device footprint — and the shop now owns that record.
6. Being straight with you — the trade-offs
- You are the operator. Upgrades, PHP compatibility and backups become your responsibility (or ours, if you ask us to run it).
- The database grows. Plan a retention window or periodic archiving.
- Self-hosting is not the same as "invisible". Without the rename step, the default file names are blocked just like any other tracker.
- Single point of failure. If the analytics host is down, tracking pauses. It does not lose your shop's sales — but it does mean quieter reports that day.
- It is not magic for tiny traffic. With a handful of visitors a day, either tool is noisy. Self-hosting wins on principle, detail and cost — not on volume.
7. FAQ
Does it slow my shop down?
The tracker is a small script served from your own host. With Hong Kong hosting for Hong Kong visitors it is typically faster than a request to a global third party.
Will it hurt my SEO?
No. There is no crawler-visible change; the tracking script is not an SEO signal.
Can I keep my existing analytics history?
Usually yes. If you already run Matomo or its predecessor Piwik, the database can be upgraded in place — one of our installs came from a 5.1.0 installation carrying 42,000+ historical visits.
Do I need to be technical?
Not for day-to-day use. The dashboard is point-and-click. Setup is the technical part — that is what you would be hiring us for.
What about my customers' personal data?
You set the retention window, you can anonymise IPs, and the data never leaves your infrastructure for analytics purposes. We can document exactly what is stored.
8. Want this on your shop?
We install, rename, wire up e-commerce tracking, migrate existing history and verify against your real orders — then hand you a dashboard that belongs to you.
Ask us: can my OpenCart shop run its own analytics? → Talk to us · See pricing

