-
Notifications
You must be signed in to change notification settings - Fork 214
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
Clarity 0.7.43 breaks partytown integration #645
Comments
thanks, have a PR coming out to fix this shortly |
@ender336 I see your PR was merged, any idea when this will go out? |
The CDN now serves the version 0.7.45 and the issue still persists, I have tried to look into it, but I am not sure why it is not working. When I console.log from within the worker:
I get these results:
It looks like the property is there but it is also set as undefined for some reason. |
hmmm I'll take a look thanks for the report |
@lampask are you still seeing this issue? I got the partytown repo running and things seemed to work - there's a test in there specifically for Clarity. https://partytown.builder.io/tests/integrations/clarity/standard.html I think they were going to start to polyfill CSSMediaRule: BuilderIO/partytown#614 but it looks like that didn't go in. If you're still seeing the issue can you email the site that you're having an issue with to [email protected] |
@ender336 The link you provided is a test page for standard clarity without including it in the worker. It is a bit of a confusing naming - in the The right test is here: https://partytown.builder.io/tests/integrations/clarity/ This one (just named Partytown Clarity), uses the snippet inside type This is the script that intercepts default behaviour: const observer = new MutationObserver(mutations => {
mutations.forEach(({ addedNodes }) => {
addedNodes.forEach(node => {
// For each added script tag
if (node.nodeType === 1 && node.tagName === 'SCRIPT') {
const src = node.src || '';
if (node.src.includes('clarity.js')) {
node.type = 'text/partytown';
node.src = './clarity.bundle.js';
}
}
});
});
});
// Starts the monitoring
observer.observe(document.documentElement, {
childList: true,
subtree: true,
}); When deploying app I could probably do the same "hack", but I wanted to avoid that in favor of serving clarity from GTM. |
Hey everyone, Is this still an issue? |
Describe the bug
New mediaInsertRule (and mediaDeleteRule) breaks clarity deployment inside webworker. We are running clarity through partytown and CSSMediaRule is undefined there, accessing it results in error printed to console.
This is only present in version 0.7.43, where the rules first appear. Previously version 0.7.41 ran without any issues.
Repro Steps
type="text/partytown"
The text was updated successfully, but these errors were encountered: