Tips For Optimizing Page Speed When Using Drift

Hey there! I thought this would spark a good discussion about how others in the community are tackling this dreaded challenge of page speed! Our team loves using Drift as a sales tool, but we're also seeing that the script is pretty heavy on Mobile networks compared to other scripts. This is understandable due to the function it's providing.

So...let's work together on tips to improve this! I'm going to share a screenshot of my external scripts loading on the page. This was provided by Google's Page Speed Testing Tool:

As you can see here from our scripts, Drift is the largest external script - has anyone been able to implement any type of hack to minimize the size loading on pages? Also, how is the "size" identified? If we have less Playbook options or questions, would it reduce the size?


  • Hey @Phil Rinaldi 👋 We actually have this help doc that will help out!

    We are working on fixing this overall, but for now our team put together a couple of different scripts to help with page load in the meantime.

    Let us know if this helps, and if anyone else has any suggestion we would love to hear them 👂️

  • Thank you @[email protected] !!

    Big improvements using this help doc...

    Basically, we've now removed Drift from the page load time completely using this "hack". It was very easy to do as well. I wrapped the embed code for Drift in a JS Function and then added another script to execute the Drift Script after the page has loaded for 5 seconds.

    The downside is that the Drift Playbook won't load until 5 seconds after the pages loads. It felt natural when browsing the website, but we might change it to 2 or 3 seconds (which would keep the same time savings on page load).

    If anyone else has suggestions, please share :)

  • Hey @Phil Rinaldi

    We did it slightly differently. We load drift based on an event...

    Mouse movement, scroll, etc. It makes it so that Drift doesn't slow down the site at all.



  • @[email protected] is there a timeline for the rollout of the fix? Until recently I didn't realize how bloated drift is, and a javascript delay only really tricks google, and doesn't solve for the massive load time. I'm likely going to have to look elsewhere for chat engagement.

  • Hey @TEC Equipment 👋🏻

    In Q2 we will be doing a beta rollout of our new widget!

    This new widget will load quicker, and be more deliverable on more devices and browsers. However the overall “size” of the script itself will not be substantially smaller.

    Hope that helps!

  • I have some tips for the drift development team, hopefully it's not needed with the new beta, but I think it can't hurt to get more tips.

    1 ) There are a lot of DNS lookups,,,,,,,,,,

    Maybe these can be more or less consolidated into 1 domain.

    2) Drift also loads googlefonts that are not used. Maybe some option to turn loading them on or off.

  • Any update on this? It would appear Q2 has passed and no update to this

  • Hi @[email protected] 👋 Katie here with Drift Support!

    Thanks for checking in here for an update. I just looked into your account and you have been moved to v2 of the Drift widget. This widget is meant to improve the loading time, as well as the deliverability on more devices and browsers. I would suggest re-running the tests with this improved widget and see if this issue still currently persists.

    If you still have questions about this, please don’t hesitate to chat into Drift support from your account or email us at [email protected].

    Have a good one!

  • There's no real way to be certain as I don't have screenshots of old tests, but it doesn't appear the new widget does much if anything in the way of actual speed improvements. Comparing the same page with the drift widget on and off, there is 7 seconds of difference between time to interactive on the mobile test.

    I get that software takes resources, but I'm not sure why it was said this version would improve performance when it looks like it didn't do anything.

  • Hi @[email protected]!

    Thank you for the follow up and screenshots. I am going to move our conversation about your v2 widget speed over to a support ticket so our team can dig into it and provide more details for you. We will reach out via email within 24 hours.

    Have a great rest of your day!

  • Hi All,

    We are running on v2 of the drift widget, it looks great and works well. I do have some remarks that may improve speed/loading times. I hope this finds you well.

    I think the team should have a look at the BrandonText font that is loaded. For example are all variants needed? By removing some it might save some kb on first load.

    I also saw a notification MP3 being loaded, while we don't use sounds for chat, is that loaded on default even though it's off?

    Also if you run the website through a tool like gtmetrix it could give some hints about the drift implementation. Small reductions by compressing chat icon images (s3 bucket) and cache them client side with a long enough expiry date. This could also be done for the main JS for the bot or the chunks, cache it for longer so it doesn't need to be downloaded every time (you must however change something in the url when a new version is released). Setting a character set early on the widget subdomain /core could speed up browser rendering.

    There are still a lot of DNS lookups needed for the chat. I believe these still need to be reduced. (flow, targeting, event, conversation, metrics, bootstrap, messaging etc)

    For the mean time I have a tip for other users (v2 and below) to add some preconnects in the <head> section for the time being, this will speed up loading. More information can be found here:

  • Hey @Lennart Wesdijk ,

    There's definitely some cleanup to be done in regards to the fonts and the sound mp3 as we move to get our new widget out of the beta stage.

    Regarding the DNS lookups, while we are continuing to clean those up, not all of those are always displayed on load and if you look at each of the iframes inside the widget iframe, you'll see that we also add dns prefetching to our main services (though I do notice that we're missing a couple).

    Appreciate the feedback and suggestions,

    Will - Widget Team

  • I just checked lighthouse reports. I can see Drift is really picking up speed now! Blocking time is very reduced. Keep up the good work!

  • Hey @Phil Rinaldi ; hoping you can provide some additional details on the "hack" that you mentioned above. We're seeing that Drift is impacting our site speed and hindering our search performance as a result. I can't seem to find the help doc you referenced, so any insight is appreciated!

  • Drift loads google fonts that are not used. Maybe some option to turn loading them on or off.