how do i change tiktok script tag from async to defer. I can't seem to find where to do it.

SeanDS
Tourist
4 0 1

how do i change a tiktok script tag from async to defer. I can't seem to find where the code is and how to do it. many thanks.

Replies 2 (2)

BSS-Commerce
Shopify Expert
3477 462 524

Hi @SeanDS 

To change the TikTok script tag from async to defer, you will need to modify the code in the HTML file of your website.

Here are the steps you can follow:

  1. Find the code for the TikTok script tag in the HTML file. It will look something like this:
<script async src="https://www.tiktok.com/embed.js"></script>
 
  1. Change the async attribute to defer:
<script defer src="https://www.tiktok.com/embed.js"></script>
 
  1. Save the changes to the HTML file and upload it to your website.

That's it! By changing the async attribute to defer, you are telling the browser to load the TikTok script after the rest of the HTML content has loaded, which can improve the performance of your website.

Hope this helps you.

If our suggestions are useful, please let us know by giving it a like, marking it as a solution, or donating here .


B2B Solution & Custom Pricing | Product Labels by BSS


Need help from our expert? Kindly share your request with us via community@bsscommerce.com


BSS Commerce - Full-service eCommerce Agency
SeanDS
Tourist
4 0 1
Thanks for your help.
How do I get to the HTML file please.