navigation | ||
---|---|---|
|
Extend Docus with the power of Nuxt modules
Docus is based on Nuxt, so you can benefit from the existing ecosystem of Nuxt Modules.
There are multiple analytics modules that you can use with your documentation. Just choose the one that you prefer.
If you want to use Plausible, you can do so with the vue-plausible
plugin.
-
Register on Plausible and add your website info.
-
Install the Plausible plugin in your project.
::code-group
yarn install vue-plausible
npm install vue-plausible
::
- Register the plugin
export default {
buildModules: [
'vue-plausible'
]
}
That's it! Deploy your project and enjoy Plausible. ::
If you didn't find the integration you were looking for or if you don't want to use an existing module, you can always can set things up manually. Let's say you want to integrate Plausible Analytics manually.
After you complete registration, Plausible gives you an install snippet, a script tag that looks like this:
<script async defer data-domain="YOUR_DOMAIN" src="https://plausible.io/js/plausible.js"></script>
All you need to do is add this script inside the <head>
of your website. This can be done using the head property.
So just edit nuxt.config.js
and add the script:
export default {
head: {
script: [
{ async: true, defer: true, "data-domain": "YOUR_DOMAIN", src: "https://plausible.io/js/plausible.js" }
]
}
}