Restricting Cookie Domain for Microsoft Clarity When Injecting via GTM

Graham Douglas 0 Reputation points
2025-02-26T22:53:15.9266667+00:00

Hello,

I’m using Microsoft Clarity on our website via Google Tag Manager. The Clarity tracking snippet is injected using GTM.

We’re encountering an issue where the cookie created by Clarity has its domain set to the top level domain .xyz.com rather than the specific subdomain 123.abc.xyz.com

This is causing privacy concerns for the service and is causing extra firewall challenges.

My questions are:

  1. Is it possible to restrict the cookie domain for Microsoft Clarity when injecting the script via GTM?
  2. If yes, what is the supported method to force Clarity to set cookies specifically for 123.abc.xyz.com rather than .xyz.ca?
  3. Are there any recommended workarounds or configurations that can be applied solely via JavaScript (or through GTM) without modifying host-level settings?

Thank you,

Graham

Community Center | Not monitored
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.