docsify-plugin-ga
v1.0.3
Published
> **Note** > `plugins/gtag.min.js` is now included in Docsify. As this plugin is no longer necessary, please consider replacing it. > https://github.com/docsifyjs/docsify/blob/develop/docs/plugins.md#google-analytics-4-ga4
Downloads
7
Readme
Install Google Analytics 4 and Universal Analytics.
This plugin is no longer necessary 🪽
Note
plugins/gtag.min.js
is now included in Docsify. As this plugin is no longer necessary, please consider replacing it.
https://github.com/docsifyjs/docsify/blob/develop/docs/plugins.md#google-analytics-4-ga4
window.$docsify = {
- ga: 'G-XXXXX',
+ gtag: 'G-XXXXX',
};
- <script src="//cdn.jsdelivr.net/npm/docsify-plugin-ga"></script>
+ <script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/gtag.min.js"></script>
Usage
<script>
window.$docsify = {
ga: 'G-XXXXX',
};
</script>
<script src="//cdn.jsdelivr.net/npm/docsify/lib/docsify.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/docsify-plugin-ga"></script>
GA4 and UA can be used together.
<script>
window.$docsify = {
ga: [
'G-XXXXX',
'UA-YYYYY-Z',
],
};
</script>
License
MIT