Update plausible analytics
All checks were successful
Build release image / build (push) Successful in 3m4s
All checks were successful
Build release image / build (push) Successful in 3m4s
This commit is contained in:
@@ -44,12 +44,15 @@ const config = {
|
|||||||
|
|
||||||
scripts: [
|
scripts: [
|
||||||
{
|
{
|
||||||
src: 'https://plausible.nicelycomposed.codes/js/script.outbound-links.js',
|
src: 'https://plausible.nicelycomposed.codes/js/pa-MT46IhokfYZrpmWFXgQq-.js',
|
||||||
defer: 'true',
|
async: true,
|
||||||
'data-domain': 'yevi.org',
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
||||||
|
clientModules: [
|
||||||
|
require.resolve('./src/components/plausible-analytics/init.js'),
|
||||||
|
],
|
||||||
|
|
||||||
presets: [
|
presets: [
|
||||||
[
|
[
|
||||||
'classic',
|
'classic',
|
||||||
|
|||||||
6
src/components/plausible-analytics/init.js
Normal file
6
src/components/plausible-analytics/init.js
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
import ExecutionEnvironment from '@docusaurus/ExecutionEnvironment';
|
||||||
|
|
||||||
|
if (ExecutionEnvironment.canUseDOM) {
|
||||||
|
window.plausible = window.plausible || function () { (plausible.q = plausible.q || []).push(arguments) }, plausible.init = plausible.init || function (i) { plausible.o = i || {} };
|
||||||
|
plausible.init();
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user