Skip to content

Commit

Permalink
Adding cookie consent to theme
Browse files Browse the repository at this point in the history
  • Loading branch information
AshleyHenry15 committed Dec 11, 2024
1 parent 749e952 commit 1d2c4d0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions _extensions/posit-docs/_extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ contributes:
website:
favicon: "assets/images/favicon.svg"
bread-crumbs: true
cookie-consent:
type: express
style: headline
navbar:
pinned: true
logo: "assets/images/posit-icon-fullcolor.svg"
Expand All @@ -33,5 +36,4 @@ contributes:
link-external-newwindow: true
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 1d2c4d0

Please sign in to comment.