# HubSpot Embed Code - Split Website tracking and Chat widget

**URL:** <https://community.hubspot.com/t/hubspot-embed-code-split-website-tracking-and-chat-widget/116305>\
**Category:** GDPR\
**Tags:** gdpr\
**Created:** [September 13, 2024, 9:04am UTC](https://community.hubspot.com/t/hubspot-embed-code-split-website-tracking-and-chat-widget/116305 "2024-09-13T09:04:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![KasperHansen](https://avatars.discourse-cdn.com/v4/letter/k/d07c76/32.png) [@KasperHansen](https://community.hubspot.com/u/KasperHansen)\
**Post date:** [September 13, 2024, 9:04am UTC](https://community.hubspot.com/t/hubspot-embed-code-split-website-tracking-and-chat-widget/116305/1 "2024-09-13T09:04:41Z")

</div>

Hi

We are facing a combined GDPR- and functionality issue regarding the HubSpot tracking embed code, which I would like to draw on the community’s experience to hopefully solve.

We’re using the HubSpot Chat functionality across all our platforms/websites.

Our main website is on the HubSpot CMS. Besides that, we have two separate domains for our product applications, that are not on the HubSpot CMS.

On the non-HubSpot domains, we have implemented the HubSpot embed code to run the Chat and general website tracking.

Here comes the issue: We would like to run the Chat and the website tracking independently of each other.

The reason for this is to comply with GDPR and Cookie regulations. I want to allow the user to reject website tracking cookies (Set it as a marketing cookie) but always run the Chat widget, thus setting it as a necessary cookie.

Have any of you successfully “split” the embed/tracking script into “website tracking” and “Chat widget”?

Thank you for any input on this!

---

<div class="post-metadata">

**Author:** ![Olivia\_Hatchi](https://avatars.discourse-cdn.com/v4/letter/o/74df32/32.png) [@Olivia\_Hatchi](https://community.hubspot.com/u/Olivia_Hatchi)\
**Post date:** [September 13, 2024, 2:24pm UTC](https://community.hubspot.com/t/hubspot-embed-code-split-website-tracking-and-chat-widget/116305/2 "2024-09-13T14:24:39Z")

</div>

Hi @KasperHansen!

My name is Olivia. I am an ex-HubSpotter turned HubSpot expert for Baskey the agency. Happy to help here!  
Just to confirm, as you saying that on your non-HS pages, when someone rejects cokies, the chatbot does not appear? That is certainly unexpected behavior.  
If possible, would you be able to send me a link to where I could see this behavior in action? I’ll be glad to dig in and see if there is a way past it.
