-
-
Notifications
You must be signed in to change notification settings - Fork 415
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Autoclear Not Working with Subdomains #568
Comments
Hi @daleharrison,
This is precisely the issue since the plugin only looks for cookies in the current domain (a subdomain, in your case), unless told otherwise. You can specify a cookie_table: [
{
col1: '_fbp',
domain: 'example.com'
}
] Looks like these 2 options are missing from the docs; I will add a dedicated section with an example for future users. |
@orestbida Thanks for the quick response, just what I was looking for! |
Expected Behavior
On a subdomain (e.g.
my-site.example.com
), the Meta Pixel_fbp
cookie should be deleted when rejecting cookies after previously accepting them.Current Behavior
The
_fbp
cookie is not deleted despite being defined in thecookie_table
andautoclear_cookies
being set totrue
.Steps to reproduce
Proposed fix or additional info.
I don't have a proposed fix but I'm looking to determine if this is an issue with the script, a browser limitation, or a problem with how the Meta Pixel cookie itself is set.
I notice that when I visit my site at e.g.
my-site.example.com
, the_fbp
cookie's domain is.example.com
. I suspect this might be the cause of the issue.The only way I've found that seems to make it work as desired is to change my
cookie_domain
configuration explicitly toexample.com
instead of letting it use the defaultlocation.hostname
, but I'm not sure if this is intentional or a fluke, as my understanding is that this is to control the domain of the consent settings cookie.Below is the configuration I'm currently using, without
cookie_domain
included. I've omitted some identifying information to protect my client's privacy.I have also added
type="text/plain" data-cookiecategory="analytics"
to my Meta Pixelscript
tag.I do not experience this issue on sites that aren't using subdomains, e.g.
example.com
works perfectly.Version
2.9.2
On which browser do you see the issue?
Chrome
The text was updated successfully, but these errors were encountered: