Shopify Speed Optimization Scam ( How to Fix )

Last updated: January 21 2022

If you recently got this Javascript code in your Shopify theme files, you may consider removing it.
However, you need to make sure the corresponding tags are being deleted.

Before making any changes, consider securing a backup.
Downloading Shopify theme: https://help.shopify.com/en/manual/online-store/themes/managing-themes/downloading-themes

Malicious code highlighted:

Obfuscated JavaScript code:

Resources:
https://community.shopify.com/c/site-speed/store-speed-score-and-document-write/td-p/1290558
https://community.shopify.com/c/site-speed/store-speed-scam-shopify-speed-do-not-match-lighthouse-speed/td-p/1302210