Skip to content

Commit a4129f8

Browse files
committed
Enable Google Analytics
Prior to this change, the Hackney Google Analytics container ID was passed to `docusaurus/plugin-google-analytics`, which _looks_ correct but was deprecated in favour of `docusaurus/plugin-google-tag-manager`. Analytics would have stopped working sometime in 2023. This change updates our site to use the modern approach. The plugin itself is bundled with the classic theme we're using, so only a configuration change is required. The containerId is shipped to the browser on every page render, so it's not considered a secret.
1 parent 3dafda0 commit a4129f8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docusaurus.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ const config = {
5252
theme: {
5353
customCss: './src/css/custom.css',
5454
},
55-
googleTagManager: {
56-
containerId: 'G-TB9MPCKBPC',
55+
gtag: {
56+
trackingID: 'G-TB9MPCKBPC',
5757
},
5858
}),
5959
],

0 commit comments

Comments
 (0)