Skip to content

Instantly share code, notes, and snippets.

@marceldegraaf
Created May 7, 2019 18:16
Show Gist options
  • Save marceldegraaf/e2c490c3f3db11f41db681bab2c12b4f to your computer and use it in GitHub Desktop.
Save marceldegraaf/e2c490c3f3db11f41db681bab2c12b4f to your computer and use it in GitHub Desktop.
Segment Consent Manager does not render cookie bar
<html>
<head>
<script
src="https://unpkg.com/@segment/consent-manager@1.2.0/standalone/consent-manager.js"
crossorigin="anonymous"
defer
data-container="#target-container"
data-writeKey="TLCDA2F..."
data-bannerContent="We use cookies (and other similar technologies) to collect data to improve your experience on our site."
data-bannerSubContent="You can change your preferences at any time."
data-preferencesDialogTitle="Website Data Collection Preferences"
data-preferencesDialogContent="We use data collected by cookies and JavaScript libraries to improve your browsing experience, analyze site traffic, deliver personalized advertisements, and increase the overall performance of our site."
data-cancelDialogTitle="Are you sure you want to cancel?"
data-cancelDialogContent="Your preferences have not been saved. By continuing to use our website, you՚re agreeing to our Website Data Collection Policy."
></script>
<style>
#target-container {
position: fixed;
left: 0;
right: 0;
bottom: 0;
z-index: 100;
}
</style>
</head>
<body>
<h1>OHAI!</h1>
<div id="target-container"></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment