Skip to content

Commit

Permalink
Cookie consent
Browse files Browse the repository at this point in the history
  • Loading branch information
AshleyHenry15 committed Dec 11, 2024
1 parent e9de099 commit 5d64c66
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion _extensions/posit-docs/_extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ contributes:
type: website
website:
favicon: "assets/images/favicon.svg"
cookie-consent:
type: express
style: headline
bread-crumbs: true
navbar:
pinned: true
Expand All @@ -34,4 +37,4 @@ contributes:
toc: true
toc-expand: true
# NEW SITES ONLY - DO NOT USE GOOGLE ANALYTICS - WE NEED TO ADD COOKIE CONSENT TO THEME. EXISTING SITES - YOU CAN ENABLE THE _ANALYTICS.HTML FILE BELOW TO CONTINUE USING GA
# include-in-header: "assets/_analytics.html"
include-in-header: "assets/_analytics.html"
2 changes: 1 addition & 1 deletion _extensions/posit-docs/assets/_analytics.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- Google Analytics 4 (G-XXXXXXXXXX) -->
<script>
<script type="text/plain" cookie-consent="tracking">
/* Use GA when hosted by our public docs site, not when installed. */
if (location.href.indexOf("docs.posit.co") >= 0) {
window.dataLayer = window.dataLayer || []
Expand Down

0 comments on commit 5d64c66

Please sign in to comment.