Skip to content

Commit 86f12c9

Browse files
authored
feat(docs): add Plausible analytics script to Docusaurus config (#11517)
* feat(docs): add Plausible analytics script to Docusaurus config * feat(docs): conditionally include Plausible analytics script based on environment
1 parent 1391b5a commit 86f12c9

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

docs/docusaurus.config.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,18 @@ const config: Config = {
3232
locales: ["en"],
3333
},
3434

35+
// Plausible cookieless analytics for tracking site usage while respecting privacy
36+
scripts:
37+
process.env.NODE_ENV === "production"
38+
? [
39+
{
40+
src: "https://plausible.io/js/script.hash.js",
41+
defer: true,
42+
"data-domain": "typeorm.io",
43+
},
44+
]
45+
: [],
46+
3547
presets: [
3648
[
3749
"classic",

0 commit comments

Comments
 (0)