Solved

Unused Javascript by Facebook and Google Tag Manager

mollycusta
Visitor
3 0 1

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.

Screenshot 2023-06-14 113243.jpeg

Accepted Solution (1)

flareAI
Shopify Partner
2405 223 540

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

flareAI : Get Sales from Google Search, on Autopilot
$10+ billion in eCommerce on Google Search, every day. Find out how much you are missing

View solution in original post

Reply 1 (1)

flareAI
Shopify Partner
2405 223 540

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

flareAI : Get Sales from Google Search, on Autopilot
$10+ billion in eCommerce on Google Search, every day. Find out how much you are missing