Skip to content

Commit

Permalink
Change GTM ID via .env
Browse files Browse the repository at this point in the history
  • Loading branch information
urmauur committed Nov 13, 2023
1 parent 46d00d6 commit 3b1fd99
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion

require("dotenv").config();

const lightCodeTheme = require("prism-react-renderer/themes/github");
const darkCodeTheme = require("prism-react-renderer/themes/dracula");

Expand Down Expand Up @@ -83,7 +85,7 @@ const config = {
},
// GTM is always inactive in development and only active in production to avoid polluting the analytics statistics.
googleTagManager: {
containerId: "GTM-59R6474K",
containerId: process.env.GTM_ID,
},
// Will be passed to @docusaurus/plugin-content-pages (false to disable)
// pages: {},
Expand Down
1 change: 1 addition & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
},
"devDependencies": {
"@docusaurus/module-type-aliases": "2.4.1",
"dotenv": "^16.3.1",
"tailwindcss-animate": "^1.0.7"
},
"browserslist": {
Expand Down
5 changes: 5 additions & 0 deletions docs/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4939,6 +4939,11 @@ dot-prop@^6.0.1:
dependencies:
is-obj "^2.0.0"

dotenv@^16.3.1:
version "16.3.1"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.3.1.tgz#369034de7d7e5b120972693352a3bf112172cc3e"
integrity sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==

duplexer3@^0.1.4:
version "0.1.5"
resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.5.tgz#0b5e4d7bad5de8901ea4440624c8e1d20099217e"
Expand Down

0 comments on commit 3b1fd99

Please sign in to comment.