Conversation
prajwal-pai77
commented
Apr 17, 2026
- Add google analytics
- Add cookie banner
There was a problem hiding this comment.
Code Review
This pull request updates the Docusaurus configuration to include OneTrust cookie consent scripts and tracking via Google Tag Manager and Google Analytics. Feedback was provided regarding a potential domain mismatch for the OneTrust script ID, the redundancy of using both GTM and gtag simultaneously which can cause duplicate tracking, and the unnecessary anonymizeIP setting for GA4 properties.
| // OneTrust Cookies Consent Notice for couchbase.com | ||
| headTags: [ | ||
| { | ||
| tagName: 'script', | ||
| attributes: { | ||
| src: 'https://cdn.cookielaw.org/scripttemplates/otSDKStub.js', | ||
| type: 'text/javascript', | ||
| charset: 'UTF-8', | ||
| 'data-domain-script': '748511ff-10bf-44bf-88b8-36382e5b5fd9', |
There was a problem hiding this comment.
The OneTrust data-domain-script ID (748511ff-10bf-44bf-88b8-36382e5b5fd9) and the associated comment refer to couchbase.com. However, this site is configured for ruby-cb-orm.com (line 11). OneTrust IDs are domain-specific; using an ID from a different domain will likely cause the cookie banner to fail to load or function incorrectly. Please verify and use the correct ID for the target domain.
| googleTagManager: { | ||
| containerId: 'GTM-MVPNN2', | ||
| }, | ||
| gtag: { | ||
| trackingID: 'G-CVKKEY0D6B', | ||
| anonymizeIP: true, | ||
| }, |
There was a problem hiding this comment.
Configuring both googleTagManager and gtag simultaneously is generally discouraged. This setup results in both tracking scripts being loaded, which can lead to duplicate event tracking (such as double page views) and negatively impact site performance. You should choose one tracking method. If you prefer GTM, you can manage your GA4 property within the GTM container and remove the gtag block.
| gtag: { | ||
| trackingID: 'G-CVKKEY0D6B', | ||
| anonymizeIP: true, | ||
| }, |