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
2851 383 406

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 or marking it as a solution.

For B2B solutions and custom pricing, check out B2B Solution & Custom Pricing |
For adding product labels/badges, visit Product Labels by BSS

BSS Commerce - Shopify Apps & Store Development Service Provider

Hire a Shopify expert | Shopify Plus Store Development

SeanDS
Tourist
4 0 1
Thanks for your help.
How do I get to the HTML file please.