How to Send Custom Event Key-Value Data in Microsoft Clarity
Question details
The user wants to know if they can send key-value data directly using the clarity('event', 'key', 'content') syntax through a custom tag.

- Product
- Microsoft Clarity
- Device & OS
- not provided
- Scenario
- Configuring custom event tracking and custom tags in Microsoft Clarity.
- Observed behavior
- The user is looking for confirmation on whether clarity('event', 'key', 'content') is a supported alternative or equivalent to the standard clarity('set', 'key', 'content') syntax.
Ensure you have admin access to your website's codebase or tag manager, and verify that the base Microsoft Clarity tracking code is already installed and firing correctly.
Consult Microsoft Clarity Official Channels for Syntax Validation
Since custom event tracking syntax and API features can evolve, the best approach to verify undocumented or specific syntax configurations is to contact official Microsoft resources.
Microsoft Clarity officially documents the clarity('set', 'key', 'value') method for sending custom tags. If you want to use the clarity('event', 'key', 'value') format, you should verify its current support status with the developer community or the Clarity support team to ensure your data is logged accurately.
Check the official Microsoft Clarity documentation under the 'Custom tags' and 'Custom events' sections to see if the specific event key-value parameters are documented.
Post your specific syntax question on Stack Overflow and tag it with 'ms-clarity'. Microsoft engineers and the developer community actively monitor this tag and can confirm technical feasibility.
Reach out directly to the Microsoft Clarity Support team via email at clarityMS@microsoft.com to get an official confirmation on whether your custom event key-value structure is supported.

Need a robust tool for your documentation and reporting? Try WPS Office
While you configure advanced web analytics with Microsoft Clarity, you might need a reliable office suite to compile your data reports and developer documentation. WPS Office is a free, lightweight, and highly compatible alternative to Microsoft Office, perfect for managing your web project files.
- 1. Download the Installer: Visit the official WPS Office website and click the free download button.
- 2. Install the Software: Run the downloaded installer and follow the quick setup wizard.
- 3. Start Creating Reports: Open WPS Office to instantly view and edit your .docx, .xlsx, or .pdf documentation.

Frequently Asked Questions
What is the difference between 'set' and 'event' in Microsoft Clarity?
In Clarity, the 'set' method is typically used to define custom tags (key-value pairs) for filtering sessions across a broader scope, while 'event' is generally used to track specific point-in-time user actions. Always refer to official documentation for syntax specifics.
Can I use Google Tag Manager to send custom events to Microsoft Clarity?
Yes, you can use Google Tag Manager (GTM) to fire a custom HTML tag containing the Clarity tracking script and any associated custom event triggers when specific user actions occur on your site.
Where can I find my Microsoft Clarity project ID?
You can find your unique project ID in the Clarity dashboard by navigating to Settings and then selecting the Setup tab. This ID is required to link your website tracking code to your account.




