Backends
Joomla
Joomla analytics with Stickybeak starts by adding its script to your rendered pages; this guide shows you where it belongs and how to track page views, goals and purchase revenue. It is a lighter alternative to Google Analytics for Joomla, with live visitors, goals and revenue attribution in one script.
Add the script
Create a child template
In the administrator, go to System → Site Templates, open Cassiopeia Details and Files, and click Create Child Template. Give it a name, such as
stickybeak.Give it its own index.php
A new child template only overrides the files you put in it.
Paste the Joomla visitor tracking snippet
Copy your snippet from Settings in the dashboard. In the child's
index.php, paste it with the queue line above it, just before</head>:<jdoc:include type="scripts" /> <script>window.stickybeak = window.stickybeak || function () { (window.stickybeak.q = window.stickybeak.q || []).push(arguments); };</script> <script defer data-site="YOUR_SITE_ID" data-domain="example.com" src="https://app.usestickybeak.com/_cfw/s.js" ></script> </head>Use the child template
Go to System → Site Template Styles and click the star next to your child template's style to make it the default.
Check it's working
Publish and use a private window.
See Verify your install.
Track goals
- Clicks: add
data-goalto links and buttons in your template overrides, or in an article's HTML if your editor allows data attributes. See Custom goals. - Forms: most form extensions can redirect to a thank-you page after a submission. Add a goal for a page visit to that page's path under Manage goals in Stickybeak. No code needed.
Track purchases
Render window.stickybeak("purchase", { revenue, currency, order_id }) on the checkout confirmation page.
See Revenue.
If it isn't working
- Use a child template so updates do not overwrite the edit; clear Joomla caching after changes.
See Troubleshooting.