Online store performance and site speed optimization
Hi, I have been looking into my page speed and have managed to reduce the unused JavaScript taken by Shopify files. I now have an issue where I do not know where to locate the unused files by Google Tag Manager and Facebook. Are these still located in theme.liquid or are they located externally? Let me know if you have any advice.
Solved! Go to the solution
This is an accepted solution.
Hello @mollycusta,
Good day! Gina from flareAI app helping Shopify merchants get $6Million+ in sales from Google Search, on autopilot.
Here are some instructions on how to find and manage these scripts.
-> Checking the theme.liquid file in your Shopify theme. To access it, go to your Shopify admin, select 'Online Store,' then 'Themes.' Click on the 'Actions' dropdown for your active theme and choose 'Edit code.' Look for sections such as `<head>` or `<body>` where you might find the script tags related to Google Tag Manager or Facebook. You can modify or remove them according to your requirements.
-> If you are using third-party apps to handle the Google Tag Manager or Facebook integration, the scripts might not be directly located in the theme.liquid file. In such cases, you need to identify the specific app responsible for adding those scripts.
* Check the Apps section: In your Shopify admin, navigate to 'Apps' and review the installed apps. Look for any apps related to Google Tag Manager or Facebook integration.
* App settings: Once you have identified the relevant app, access its settings or configuration options. Look for sections related to script insertion or integration. Some apps provide a dedicated area for managing scripts.
* Consult app documentation: If you are uncertain about the script's location within an app, refer to the documentation or support resources provided by the app developer. They can guide you on how to find and modify the scripts.
Remember to exercise caution when modifying code, particularly in the theme files. It is recommended to create a backup of your theme before making any changes. If you are unsure, seek assistance from the app developer or a Shopify expert.
To remove unused JavaScript, you can use a development tools to inspect the network requests that are made when your store loads. Once you have identified the JavaScript files that are not being used, you can remove them from your theme or app files.
I trust this will be of benefit to you.
Gina
This is an accepted solution.
Hello @mollycusta,
Good day! Gina from flareAI app helping Shopify merchants get $6Million+ in sales from Google Search, on autopilot.
Here are some instructions on how to find and manage these scripts.
-> Checking the theme.liquid file in your Shopify theme. To access it, go to your Shopify admin, select 'Online Store,' then 'Themes.' Click on the 'Actions' dropdown for your active theme and choose 'Edit code.' Look for sections such as `<head>` or `<body>` where you might find the script tags related to Google Tag Manager or Facebook. You can modify or remove them according to your requirements.
-> If you are using third-party apps to handle the Google Tag Manager or Facebook integration, the scripts might not be directly located in the theme.liquid file. In such cases, you need to identify the specific app responsible for adding those scripts.
* Check the Apps section: In your Shopify admin, navigate to 'Apps' and review the installed apps. Look for any apps related to Google Tag Manager or Facebook integration.
* App settings: Once you have identified the relevant app, access its settings or configuration options. Look for sections related to script insertion or integration. Some apps provide a dedicated area for managing scripts.
* Consult app documentation: If you are uncertain about the script's location within an app, refer to the documentation or support resources provided by the app developer. They can guide you on how to find and modify the scripts.
Remember to exercise caution when modifying code, particularly in the theme files. It is recommended to create a backup of your theme before making any changes. If you are unsure, seek assistance from the app developer or a Shopify expert.
To remove unused JavaScript, you can use a development tools to inspect the network requests that are made when your store loads. Once you have identified the JavaScript files that are not being used, you can remove them from your theme or app files.
I trust this will be of benefit to you.
Gina
On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023You've downloaded the Search & Discovery app from the Shopify App store, and as you're ...
By Skye Nov 8, 2023The year-end shopping season is just around the corner. Is a flash sale on your radar? Are...
By Jasonh Nov 6, 2023