Use plausible for my writeas blog

Dears,

I like the stats provided by writeas but I want to go further and I would like to know if it is possible to use Plausible with it.

All I need to do is to paste this snippet in the <head> of the blog :

<script async defer data-domain="rednosehacker.com" src="https://plausible.io/js/plausible.js"></script>

Is it possible ?

Cheers

Hi @jeko, this should be possible with the Custom Javascript support on Write.as. However, you would need to upgrade to a Pro account to use this feature.

In the Customize page for the Blog, there is a Custom Javascript section with a box where you can paste this line and it should be available on the pages of the blog after saving it.

I think this has actually come up before (maybe in the fediverse), but unfortunately it isn’t possible to add in Plausible Analytics right now. You could technically include the JS as mentioned here, but the problem is the data-domain="rednosehacker.com" attribute – we don’t support that extra data right now.

Maybe this is a discussion you or we could start with the Plausible folks. Some possibilities could be fully integrating with them, or just supporting the JS attribute they need.

Sorry, I did not come back here haha.

It’s not mandatory to me. I was just curious !

Thank you @matt

I know I would love the ability to add plausible analytics. They’re a great ethical choice for site analytics.

Actually, thanks to this walkthrough from @vivgui, here’s how you could add Plausible Analytics to your blog!

2 Likes

@matt I actually have been messing around with several scripts and managed to get Plausible working this way, along with Commento, a Google search for my site, and Hypothes.is working all together.

I stumbled on it as I’m not anywhere near a coder.

But thought I’d share my custom JavaScript entry in case someone else comes across this:

// src: https://cdn.commento.io/js/commento.js

// src: https://hypothes.is/embed.js

// src: https://visits.muttering.me/js/plausible.js

const font = document.createElement('link');
font.setAttribute('rel', 'stylesheet');
font.setAttribute('href',     'https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,400;0,500;1,400&display=swap');
document.head.appendChild(font);


script.setAttribute('src', 'https://cse.google.com/cse.js?cx=9e698900778c6b93e');
document.head.appendChild(script);

script.setAttribute('data-domain', 'significantbullet.co'); *Plausible Domain Snippet*


var topP = document.createElement("p");
topP.innerHTML = '<div id="commento"></div>';
var cont = document.getElementById("wrapper");
cont = document.getElementById("post-body");
cont.appendChild(topP);
1 Like