If your website asks visitors to accept cookies before tracking starts, the Blue Tracely script has to follow that choice. Done well, the script runs as soon as a visitor accepts and never runs for visitors who decline. Done badly, it either runs too early or never runs at all.
What this means for Blue Tracely:
- If your rules require consent, the script shouldn't run before the visitor accepts.
- The script reads CookieYes by itself. With any other consent management tool, your tool or tag manager has to hold the snippet back.
- What exactly you need depends on the rules that apply to you and on your tool. Check with your lawyer.
Best practice: tie the script to the visitor's acceptance
Add the snippet only after the visitor accepts
The most reliable approach is to keep the Blue Tracely snippet off the page until the visitor accepts advertising cookies. The script then writes no cookies and makes no requests before consent, because it isn't there.
Steps to put this in place
When the page loads:
- Don't add the snippet. Leave it out of the page's initial code, or let your consent tool block it.
- Show your banner. Tell visitors how you use cookies, including for advertising, and ask for their choice.
When the visitor answers:
- Listen for acceptance. Use your consent tool's own way of knowing that the visitor accepted the advertising category, such as an event, a callback or a tag manager trigger.
- Add the snippet then, on the same page. The script starts a few seconds after it's added and can still report the page the visitor is on.
- Assign Blue Tracely to the advertising category in your tool, so it follows the right choice.
After acceptance:
- The script runs normally. It writes its cookies and identifies the visitor if it can.
- Returning visitors who already accepted should get the snippet when the page loads, without waiting for a new choice.
- Test it. Check that the script doesn't start before acceptance and that it starts after. See Troubleshooting.
The steps inside your consent tool differ from tool to tool. Follow its documentation. For Google Tag Manager, see How to configure Google Tag Manager to fire the Blue Tracely tag only after consent is given.
Avoiding bad practices
Loading the script and blocking only its cookies
Some tools let a script load but try to stop it from setting cookies until the visitor accepts. Avoid this with Blue Tracely:
- The script depends on its cookies. It uses them to remember the visitor, group page views into a visit and avoid running twice on the same page. It does nothing at all in a browser with cookies turned off. If its cookies are blocked or deleted while it runs, it may send nothing.
- It may miss the visitor. The script runs once per page load. If it has already run when the visitor accepts, it may not identify them until they load another page.
Hold back the whole snippet instead.
Releasing the snippet only on the next page
A trigger that adds the snippet only when the next page loads misses visitors who accept and leave. Release it on the page where the visitor accepts.
Recap
Tie the script to your banner by adding the snippet only after the visitor accepts advertising cookies, on the same page. That keeps you in line with your banner and avoids missed identifications. Also give visitors a direct way to opt out: our suggested notice in the Cookie Policy points them to Your Privacy Choices.
Using third-party consent management tools
How you connect Blue Tracely depends on your tool:
- CookieYes: the script follows the visitor's choice by itself.
- Any other tool: the script doesn't read its choices. Set up the tool, or your tag manager, to add the snippet only after the visitor accepts.
In every case, a browser that sends Global Privacy Control gets nothing from the script: no cookies and no requests.
Example: CookieYes
- Install the snippet as usual. Put it on every page, the normal way.
- The script waits by itself. Before the visitor answers, it waits and keeps checking. Once they accept CookieYes's Advertisement category, it carries on.
- Declines are respected. If the visitor declines, the script sends nothing and contacts no other service.
- For stricter rules: the script writes a few first-party cookies, such as a random visitor ID, before it checks consent. If no Blue Tracely cookie may be written before consent, have CookieYes hold back the snippet until the visitor accepts the Advertisement category.
See Using CookieYes Cookie Consent with Blue Tracely.
Troubleshooting
If the script doesn't start, or you see fewer visitors than expected:
- Placement: check that the snippet is added once, in the page's
<head>or by your tag manager, and not twice. - Consent settings: check that Blue Tracely is in the advertising category and that the trigger fires on the page where the visitor accepts.
- Testing: open your site in a private window, accept, and type
bluetracelyin your browser's console. After a few seconds, you should see an object listingloaded,assignIdentityandcollect. In a new private window, decline and check your site's cookies. If your tool holds back the snippet, no cookie whose name starts with_vsehemshould appear. With CookieYes alone, no_vsehemgeocookie should appear. - Opt-out link: check that your privacy policy or banner tells visitors how to opt out.
See Troubleshooting: Cookie Policy Banner Blocking Blue Tracely.