Comments (15)
We too had this issue and not entirely sure of the cause but our workspace had multiple website sources. Removing all but one had the Consent Manager working as intended.
If this is also the case with your issues, have you any idea why this may be? Or how it could be fixed?
from consent-manager.
Did you figure this out?
from consent-manager.
Nope, we ended up rolling our own cookie bar implementation because we ran into too much trouble with the Segment one.
from consent-manager.
Anyone has this fixed? I got the same problem
from consent-manager.
For us it seemed that we could only have a single source and it had to contain a destination. I assume that without these, the consent bar had no reason to display as no destinations were using cookies or implemented script into the browser.
from consent-manager.
@discovrbookings I try to add source from javascript and destination to slack. But no matter what it is not showing anything
from consent-manager.
@Uysim Are you receiving events in the debug of the source? Also, does the Segment script show up in your <head>
. We did find that it wasn't immediately available and coming back later it was there. Also, clear your cookies in browser. This may jolt the consent manager to work.
from consent-manager.
<style type="text/css">
#consent-container {
position: fixed;
left: 0;
right: 0;
bottom: 0;
z-index: 100;
}
</style>
<div id="consent-container"></div>
<!-- footer --->
<script>
!function(){var analytics=window.analytics=window.analytics||[];if(!analytics.initialize)if(analytics.invoked)window.console&&console.error&&console.error("Segment snippet included twice.");else{analytics.invoked=!0;analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on"];analytics.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);e.unshift(t);analytics.push(e);return analytics}};for(var t=0;t<analytics.methods.length;t++){var e=analytics.methods[t];analytics[e]=analytics.factory(e)}analytics.load=function(t,e){var n=document.createElement("script");n.type="text/javascript";n.async=!0;n.src="https://cdn.segment.com/analytics.js/v1/"+t+"/analytics.min.js";var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(n,a);analytics._loadOptions=e};analytics.SNIPPET_VERSION="4.1.0";
analytics.load("WRITE_KEY");
analytics.page();
}}();
</script>
<script
src="https://unpkg.com/@segment/[email protected]/standalone/consent-manager.js"
crossorigin="anonymous"
defer
data-container="#consent-container"
data-writeKey="WRITE_KEY"
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>
@discovrbookings above is my code. I use private browser so there is no cookies but It still not show anything inside consent-container
it created an empty div
from consent-manager.
You do need to remove analytics.load("YOUR_WRITE_KEY");
from your script as this is injected by the consent manager component.
from consent-manager.
@Uysim or is your code, already compiled? and that is the HTML source?
from consent-manager.
@discovrbookings what do you mean compiled? that is the html code.
from consent-manager.
@Uysim I meant are you using Angular, React, etc and your code is static content in your public folder or is it the HTML source from the browser?
from consent-manager.
@discovrbookings thank for you help. But my problem fix after mailing with support and he ask me to wait 5 or 10 minutes.
from consent-manager.
It was fixed in my case by adding a destination to the source (then waiting about 90 mins for it to take effect).
from consent-manager.
Hi everyone, sorry for the late reply. The standalone version is working correctly in the current version of consent manager, the documentation has been updated also for a clearer installation.
Here I leave a link.
https://github.com/segmentio/consent-manager#standalone-script
If you continue to have problems feel free to open another issue. On the other hand, I will close this issue since it was resolved.
Segment team.
from consent-manager.
Related Issues (20)
- Cannot read properties of undefined (reading 'initialized'), at conditionallyLoadAnalytics HOT 4
- Recreate cookie if user has trail linked to their ID on Segment HOT 3
- I can confirm that we can add
- Custom destinations to Essential category but maintaining the N/A value HOT 2
- Cannot read properties of undefined (reading addSourceMiddleware) when Incognito (Google Chrome) HOT 1
- `shouldReload` is ignored sometimes HOT 1
- Consent Manager Builder on Render HOT 6
- Custom analytics events stopped working
- List categories instead of destinations when using ConsentManagerBuilder HOT 3
- `acceptAll` method in `bannerActionsBlock` overridden by `initialPreferences` settings HOT 5
- When using custom categories - it is not possible to create a category with N/A HOT 1
- Various typescript errors during build
- The preferencesDialogTemplate doesn't work as expected HOT 1
- Add Integrations to the Tools column that is not integrated via Segment HOT 1
- How we can use localization in standalone mode?
- Custom styling ConsentManager HOT 2
- Reload loop
- Setting shouldRequireConsent to false on version 5.8.1 does not track
- Send anonymous data on decline/no answer
- Minimal snippet version requirement
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from consent-manager.