Sep 16, 20217:58 AM - edited Sep 16, 20217:59 AM
Member
Sending Cookie consent data from a 3rd party cookie consent script in Wordpress to Hubspot
SOLVE
Hi there,
My question is a bit more complex as the title suggests. I'll try to explain in short.
In our Hubspot account we are using two domains. Domain 1 is using the Hubspot Cookie consent banner. Apparently it is not possible to use a separate Hubspot cookie consent banner on both domains. Therefor we installed a 3rd party cookie consent script on domain 2.
We can not install Hubspot tracking code on our website on domain 2 because that will automatically show the Hubspot cookie consent banner which is meant for the website on domain 1.
One way or another we need to be able to send user cookie consent data to Hubspot from the website on domain 2 (which is a Wordpress website). Hubspot Support suggested us to use the HubSpot API.
I have worked with APIs in PHP from other sources but in this case I don't really know where to start. Can anyone point me in the right direction?
Sending Cookie consent data from a 3rd party cookie consent script in Wordpress to Hubspot
SOLVE
We have figured out that the caching plugin (WP-Rocket) was removing the Business Unit ID from the trackiong code when the "Minify JavaScript files" option was activated. Deactivating "Minify JavaScript files" in WP-Rocket solves this issue.
Sending Cookie consent data from a 3rd party cookie consent script in Wordpress to Hubspot
SOLVE
We have figured out that the caching plugin (WP-Rocket) was removing the Business Unit ID from the trackiong code when the "Minify JavaScript files" option was activated. Deactivating "Minify JavaScript files" in WP-Rocket solves this issue.
Sending Cookie consent data from a 3rd party cookie consent script in Wordpress to Hubspot
SOLVE
👋@KimSanka . First of all, you are able to add multiple cookie policies in your account, and choose which one is for which domain. this is extensively documented right here in this link. This should get you covered with having differrent cookie concents on differrent domains.
If that doesn't cover your needs for some reason, you should write here what exactly is the issue, because if you mustuse the third party tool on that second website, things are getting very complicated, firstly because hubspot has it's own system of categorizing cookies, that is documented in this link. Secondly because the third party concent should manipulate the hubspot cookies, but this is not possible without the tracking code.
Sending Cookie consent data from a 3rd party cookie consent script in Wordpress to Hubspot
SOLVE
Thanks you very much for your reply.
We are still in comunication with hubspot Support and this morning I received verification that what we are experiencing is unexpected behaviour.
We would prefer to use Hubspot's cookie consent banner, we just installed the third party once because we understood what we wanted to do with the two websites was not possible. Aparently this is not the case.
If I'm not mistaken we have a call planned on monday with someone at Hubspot to clear it all out. so I'm hopefull it will be fixed and we will be able to inegrate our cookie policy with Hubspot fully in time. Hopefully a short one 😉