We recently hired a Shopify expert to assist us with store speed optimization and after publishing his work we noticed a 35% impact on our marketing analytics and immediately reverted his work as it was very critical for us. After that, we hired another Shopify expert to do the speed optimization from scratch but he refuses to explain his works and modifications, and scripts that he added to our store.
I was wondering if someone can explain each of the changes and modifications as shown below for us.
I would really appreciate a detailed one-by-one explanation for each part.
The block on left is BEFORE THE SPEED OPTIMIZATION and the block on right is AFTER SPEED OPTIMIZATION.
This is essentially speed hack code, see posts around this community on the nature on "Hacky" solutions to performance.
So they're change the attributes of <script> tags, ,so they don't load. Then they're loading the script tags, be fixing the attributes, UNLESS the script identifies the origin as lighthouse, so that pagespeed insights does not count the scripts towards your speed score, thus improving your speed score. Real users will probably not see any improvment in performance.
A step by step explanation is a project in itself a question of that size way beyond the scope of a forum discussion.
Narrow the scope of questions.
And avoid widescreen screenshots like this when asking for code review it just increases friction unnecessarily for any possible contributes having to wrangle a bunch of large images. Use a diff tool with temporary publicly shareable url, or a github repo if the source licenses allow.
Roughly for analytics problems the customization is just aggressively changing every script loading behavior it can. Which includes some analytics related tools.
Not 100% in agreement with @oreoorbitz on the lighthouse dodging though yet it's likely as the obfuscated code in the ~5th image messing with navigator is suspect.
Performance is a business discipline not something to just slap in.
To make actual long term gains from any investments It should be confirmed with testing of behavior among multiple tools in a process.
Thank you for your response. I agree with you, the discussion forum might not be the best option to get help regarding this topic but I am desperate for help and understanding these changes and to prevent whatever that went wrong before and impacted our advertising analytics. So please let me know where is the best place to get help regarding this detailed explanation from you or anyone that you might suggest.
Also, for "Roughly for analytics problems the customization is just aggressively changing every script loading behavior it can. Which includes some analytics related tools." and "obfuscated code in the ~5th image messing with navigator is suspect." what are your opinions about these exactly and if you think we should prevent them?
Thank you so much
You would want to hire someone, these forums are mainly for us to display our skills by giving a reasonable amount of help, thus leading to getting hired,, or just being helpful for the sake of it, but most people aren't going to do indepth super detailed help as that would be too time consuming.
See a community discussion on the topic of speed hack code here:
PualNewton has a good explanation here of the possible negatives of a obfusication method, which I believe is what is being used.
Here is another thread on the topic.
Make the shift from discounts to donations, and witness your business not only thrive fina...By Holly Dec 4, 2023
On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...By Arno Nov 27, 2023