Hello. Is anyone currently using Plausible with Joomla? I’m interested in how you set it up. Thank you.
Hi! It should be simple to integrate Plausible with Joomla. You just need to add our script to the
I tried the Joomla plugin suggested by marko.
The Plausible snippet was
<script async defer data-domain=“joomla.localdomain” src=“http://localhost:8000/js/plausible.js”></script>
But not sure how to include data-domain=“joomla.localdomain” with this plugin.
Is that bit necessary?
There is Script Declaration Type …
… generating …
$ curl -s “http://construct.localdomain”|grep plausible
<script async defer data-domain=“construct.localdomain” src=“http://localhost:80new WOW().init();s”></script>
Neither method worked.
thanks for reporting! seems like that plugin might not be able to do it. i’ve never used Joomla. had a search online and seems like Joomla allows you to edit your template. So you could go and find the index.php in your template. index.php would have the
<head> section and then paste our script in there. You could follow a guide like this: https://www.inmotionhosting.com/support/edu/joomla-3/edit-template-2/
does that work?
would be great if someone could create a community integration for Joomla to make this process simpler
Actually I tried insertion into the template before coming to this forum. The location is:
Whatever I do I keep getting " Waiting for first pageview on construct.localdomain"
Testing right now with the plugin turned off, curl shows the script included 8 lines from the bottom of <head>:
<div class="custom" > <script async defer data-domain="construct.localdomain" src="http://localhost:8000/js/plausible.js"></script></div> ... <8 other script lines> </head>
The site construct.localdomain is working as tested by curl.
curl -L http://localhost:7080/sites also is working fine.
curl http://localhost:8000/js/plausible.js produces:
curl: (7) Failed to connect to localhost port 8000: Connection refused
Is that normal?
Our script automatically disables itself when running on localhost as the majority of people didn’t want the stats to be counted on the localhost.
Thanks. That explains it.