After implementing code to set a cookie on example.com, I noticed an issue with it carrying over to the subdomain dogs.example.com.
<script>
document.cookie="cid1={{utm_campaign}}; path=/;"
</script>
The {{}} is part of Google-Tag-Manager syntax, which can be ignored for this discussion.
This script successfully sets a cookie when someone lands on example.com with specific URL parameters. However, upon navigating to the subdomain dogs.example.com, the cookie 'cid1' is no longer present. Is there a way to adjust the cookie settings to ensure it carries over to subdomains?