Insent JavaScript behavior on Websites and impact on performance
Insent is a powerful tool that enables SDRs to connect with highly engaged prospects that arrive on your website. To begin using Insent on your website, you will have to add a small piece of javascript code to your website’s HTML. This can be either directly added to the source code or injected dynamically via tag manager tools like Google Tag Manager.
Insent is built and configured with your website performance in mind. Like any other external Javascript, Insent will download extra JS files to the client's browser, which will take 100-200 milliseconds to download, depending on the internet connectivity of the client. However, Insent has been built to ensure that this additional download does not have any negative impact on your website experience.
Insent JS loading sequence on the website (first-time page load)
When your website loads for the first time on your visitor’s browser, all of your website’s assets are downloaded onto their browser. Insent main JS is also downloaded along with these assets. This would be a very small file of ~17.5 KB during the page load and can take around 50-100ms. This file is downloaded in parallel with other assets and will have very minimal impact (if any to the max of 50-100ms) on your website load time.
Insent JS first load as shown on GTMetrix
Once all of your website assets are completely loaded, Insent will then begin loading other required Insent assets, which are segmented in smaller chunks (Project_key, env, vendors, commons, Redux, and main).
All of these assets together would require around ~300KB to be downloaded onto your client’s browser as parallel requests. These assets are configured to download after your website loads completely for your visitor, and hence they do not affect your website experience.
Other assets are downloaded as parallel requests.
Once these assets are downloaded, API requests are sent out to the Insent backend, and the chat widget is shown successfully on your website.
Note: API requests from Insent execute in parallel to other API requests on your website.
Insent is optimized for the second time loading experience for your visitors.
All Insent assets are cached locally on your visitor’s browser in order to give them a faster experience during their second visit ( Page Caching). Insent fetches these assets from the local cache during the second-page load having almost zero impact on your website load time.
Occasionally, Insent pings the Content Delivery Network to ensure that Insent is optimized and running the latest available version. This ping takes about 5-10ms
About CDNs
Insent assets are hosted and distributed globally through Content Delivery Networks (CDNs) to ensure your site visitors have a smooth experience with Insent irrespective of their geographic location.
Assets are downloaded to your visitor’s web browsers through the nearest possible data center. CDN is known to be the fastest known way to deliver static assets, and this reduces download time while offering a consistent experience to your visitors.
How much do API calls from Insent impact my website performance?
API calls are made by the Insent JS to show dynamic content on your website and personalize the experience for your visitors. API calls in Insent are executed only after the page is completely loaded for your visitors.
Insent API calls are Non-blocking and fired as parallel asynchronous requests to the Insent backend to send or receive data. Insent API calls are also optimized to perform much faster during the second time page load for your visitor.
Insent also calls APIs every few seconds to constantly update the server about user activity on the page. This helps your agents working in Insent from Inbox, Slack, or MS Teams to respond to your visitors proactively. This is very similar to tools like Google Analytics and Mixpanel that track and understand user activity on the website.
Most tools like GTMetrix might show a delay in your TTI or Time to Interactive, which describes how long your site takes to be fully interactive for your visitor. This is because the chatbot is considered an interactive element on your website. This parameter, however, does not describe whether your site performance is actually affected.
Quick Recap
- Insent is designed and configured with your website performance in mind.
- Insent uses CDNs and Page Caching to ensure that the same assets are not downloaded twice.
Please feel free to reach out and connect with our support team for any further questions on success@insent.ai or Chat with us!