<script
id="ze-snippet"
src="https://static.zdassets.com/ekr/snippet.js?key=some_zendesk_key"
/>
I'm trying to optimize my web site performance. I've faced a big impact of third-party code to my performance, I think all my bundle has a lower size than zendesk code. How can I load it without impacting on the main thread? Should I use the async
or defer
tags? Or which approach is better for this case?
Third-party code consists of ads, analytics services, and other elements that are served from a domain that is different from the domain of your URL. These resources are often responsible for poor web performance, as they may contain scripts that block your main-thread and prevent other tasks from being performed.
This seems to be an issue that tortures so many people without a clear solution.
What I managed to do it to reduce the block time by adding this configuration.
window.zESettings = {
webWidget: {
chat: {
connectOnPageLoad: false
}
}
};
ref https://developer.zendesk.com/embeddables/docs/widget/settings#connectonpageload
ps I did a performance test to my zendesk helpdesk "domain.zendesk.com" and the results there were even worse
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With