Setting the Cookie Domain in TRUENDO for Subdomain Consent Management
Introduction#
When implementing the TRUENDO Consent Management Platform (CMP) on your website, it's crucial to configure the cookie domain correctly, especially if your website operates across multiple subdomains (e.g., www.example.com
, shop.example.com
). Setting the cookie domain ensures that the TRUENDO cookie, which stores the visitor's consent status, is shared across all subdomains. This prevents the consent banner from reappearing unnecessarily when users navigate between subdomains, providing a seamless user experience and maintaining compliance with privacy regulations.
1. Understanding the Cookie Domain#
A cookie domain determines which domain(s) a cookie is available to. By default, cookies are only accessible to the exact domain that set them. However, by specifying the cookie domain to include the main domain, you ensure that the same cookie is accessible across all subdomains of your main domain.
Example:
- Default Behavior: A cookie set by
www.example.com
is not accessible toshop.example.com
. - With Cookie Domain Set to
example.com
: The cookie is accessible to bothwww.example.com
andshop.example.com
.
2. Why Setting the Cookie Domain is Important#
Without specifying the cookie domain:
- Inconsistent Consent Status: Users may see the consent banner multiple times when navigating between subdomains because the consent given on one subdomain isn't recognized on another.
- Poor User Experience: Repeated consent prompts can frustrate users.
- Compliance Issues: Inconsistent consent management may lead to non-compliance with privacy regulations.
By setting the cookie domain correctly:
- Unified Consent Management: The user's consent status is shared across all subdomains.
- Improved User Experience: Users are not repeatedly prompted for consent.
- Regulatory Compliance: Ensures consistent application of user consent preferences.
3. Prerequisites#
Before proceeding, ensure you have:
- Access to the TRUENDO Console: Administrative access to configure settings.
- Knowledge of Your Main Domain: The primary domain under which all subdomains operate (e.g.,
example.com
).
4. Step-by-Step Guide to Setting the Cookie Domain in TRUENDO#
A. Access the TRUENDO Console
-
Navigate to the TRUENDO Console:
- Open your web browser and go to https://console.truendo.com/.
-
Log In to Your Account:
- Enter your credentials (email and password).
- Click "Log In".
B. Navigate to the Banner Settings
-
Select Your Project:
- If you have multiple projects, select the one you wish to configure.
-
Access the Banner Section:
- In the left-hand sidebar, click on "Banner".
C. Open Advanced Settings
-
Scroll Down to Advanced Settings:
- On the Banner settings page, scroll down to find the "Advanced" section.
-
Expand the Advanced Settings:
- Click on the "Advanced" heading to expand the settings options if they are not already visible.
D. Set the Cookie Domain
-
Locate the Cookie Domain Field:
- Within the Advanced settings, find the "Cookie Domain" input field.
-
Enter Your Main Domain:
- Input your main domain without any subdomains or prefixes.
-
Example:
- If your website is
www.example.com
, enterexample.com
. - Do not include a leading dot (
.
).
- If your website is
Important Notes:
- Do Not Include a Leading Dot: Modern browsers do not require a leading dot, and it is ignored according to the current cookie specification (RFC 6265).
- Do Not Include Protocol: Exclude
http://
orhttps://
. - Do Not Include Paths: Only enter the domain name.
Example Entry:
example.com
E. Save Your Changes
-
Apply the Configuration:
- After entering your cookie domain, review the settings to ensure accuracy.
-
Save the Settings:
- Click on the "Save" or "Update" button at the bottom or top of the page to apply the changes.
-
Confirmation:
- A confirmation message should appear indicating that the settings have been saved successfully.
5. Verifying the Configuration#
To ensure that the cookie domain is set correctly:
-
Clear Browser Cookies:
- Clear cookies for your domain in your browser settings.
-
Access Your Main Domain:
- Visit
www.example.com
(replace with your actual domain).
- Visit
-
Provide Consent:
- Interact with the TRUENDO consent banner and provide your consent preferences.
-
Navigate to a Subdomain:
- Visit a subdomain such as
shop.example.com
.
- Visit a subdomain such as
-
Check for Consent Banner:
- Expected Result: The consent banner should not reappear.
- This indicates that the TRUENDO cookie set on the main domain is recognized on the subdomain.
-
Inspect Cookies:
- Use your browser's developer tools to inspect the cookies.
- Verify that the TRUENDO cookie (
truendo_cmp
) is present and has the domain set toexample.com
.
6. Additional Considerations#
-
Multiple Domains:
- If you operate multiple distinct domains (e.g.,
example.com
andexample.net
), the cookie domain setting will not apply across them. You may need to manage consent separately for each domain.
- If you operate multiple distinct domains (e.g.,
-
Secure Flag:
- Ensure that your website uses HTTPS so that cookies are transmitted securely.
-
Cookie Path:
- By default, the cookie path is set to
/
, making it accessible across the entire domain.
- By default, the cookie path is set to
-
Cross-Domain Consent Sharing:
- For cross-domain consent sharing, additional configuration and considerations are required, which are beyond the scope of this guide.
7. Troubleshooting#
Issue: Consent Banner Still Appears on Subdomains
-
Possible Causes:
- Incorrect cookie domain entry.
- Cache issues.
-
Solutions:
- Verify Cookie Domain: Ensure that the cookie domain is set exactly as
example.com
without a leading dot. - Clear Browser Cache: Clear your browser's cache and cookies, then retest.
- Check for Typos: Ensure there are no typos in the domain name.
- Confirm Save Operation: Make sure the settings were saved successfully in the TRUENDO Console.
- Verify Cookie Domain: Ensure that the cookie domain is set exactly as
Issue: Cookies Not Being Set
-
Possible Causes:
- JavaScript errors on the page.
- Conflicts with other scripts.
- Incorrect TRUENDO script placement.
-
Solutions:
- Check Console for Errors: Use browser developer tools to look for JavaScript errors.
- Script Placement: Ensure the TRUENDO script is correctly placed in your HTML.
- Review Other Scripts: Disable other scripts temporarily to check for conflicts.
Issue: Cookies Not Accessible on Subdomains
-
Possible Causes:
- Incorrect cookie domain configuration.
- Subdomain is on a different domain level.
-
Solutions:
- Verify Cookie Domain: Ensure the cookie domain is set to
example.com
. - Check Subdomain Levels: Cookies set on
example.com
are accessible to all subdomains likesub.example.com
.
- Verify Cookie Domain: Ensure the cookie domain is set to
8. Conclusion#
Setting the cookie domain in TRUENDO is a critical step to ensure seamless consent management across all subdomains of your website. By correctly configuring the cookie domain without the leading dot, you enhance the user experience, maintain compliance with privacy regulations, and uphold the integrity of your consent management processes.
9. Support and Resources#
-
TRUENDO Support:
- If you need further assistance, contact TRUENDO support at support@truendo.com or use the chat bubble.
End of Guide
If you have any more questions or need further assistance, please feel free to ask!