Re: Caught in the middle...

Is using document.write impacting my site's PageSpeed Insights scores?

32 0 22

Hi all, Shopify suggested that I post here to see what response I get - names of the experts referred to here have deliberately not been disclosed.

I recent sought help from a shopify expert to improve my site's PageSpeed Insights (PSI) scores which had recently caused drop in Google Search Console Page Experience (GSCPE) Good URLs and Impressions. The expert made some changes which appeared to have an impressive and immediate effect on those PSI scores (Mobile 18 > 74 and Desktop 67 > 85) and, within a day or two, began to improve the GSCPE picture - but only improving from around 9% to 60%, as opposed to getting back to where it was a couple of weeks ago at 100%.

So, that's all fine, but I was then contacted by second expert, who had quoted for the same job, who said that the first expert had used some dubious methods to achieve these results...

They have added malicious code to your website to fake improve the performance. Attached is the screenshot for proof. This malicious code is just bypassing the lighthouse score. This is not improving the speed but actually making it worse. Read this forum by one the merchant got scammed with such malicious code: Being a Shopify Expert, this is our responsibility to keep the platform secure for the merchants. I have also attached the Tweet by the Performance Engineering leader about such a poor hack by some developers, Please beware.


I approached the first expert with this opinion and got the following response...

document.write is not bad for SEO at all. It has no negative impact for SEO. There is indeed optimization done on the site, it is noticeable as well. That solution is used broadly by 90% , it is not a scam at all, i mean, if there is no noticeable improvement in the speed and if it was bad for SEO then it would be a scam i would say that too. in this case it is not.


The second expert referred to bypassing the lighthouse score - but I haven't been using that as a speed reference (or Shopify's own speed scores), I'm just using PSI. So I don't know if the second expert is just trying to grab business by undermining the work of the first expert or whether they have a valid concern. Aside from faking responses, I also note from my PSI diagnostics that 'For users on slow connections, external scripts dynamically injected via `document.write()` can delay page load by tens of seconds.' - now that doesn't sound good.

It's a shame Shopify couldn't or wouldn't arbitrate on this. I go to Shopify experts because I'm not technical so it's not possible for me to judge who is write and wrong in this instance - does anyone here have an authoritative and independent view that isn't influenced by a craving to make a quick buck from a non-techie?

Replies 9 (9)

Shopify Partner
135 13 63

Whatever the first one said he is wrong. It IS indeed a scam! You asked for your site to be better and instead he just "cloaked" the tools that measure speed. And by introducing that extra script the site actually gets slower and that WILL hurt user experience, sales and SEO.

I would ask more my money back and report him wherever you can. We all need to try and combat that sort of crap.

One thing though you may learn from this is that there just isn't any short-cuts to good user experience and SEO. It's a combination of a lot of knowledge and hard work. Sure you can use tools to help you but the fact remain that you need skills and work to get real results. 

So back on the horse. Get rid of the crappy code and start doing some proper optimization 🙂

SEO Geek since 1996, consultant author and public speaker. Admin of the Shopify SEO Facebook Group

Was your question answered? Kindly mark it as an Accepted Solution 🙂
32 0 22

Hi and thanks for taking the time to reply.

However, I don't thank you for implying that I chose to implement 'crappy code' - this just adds fuel to my already intense frustration in not being able place my trust (and money) in Shopify 'Experts'.

Your reply would have been more useful if you explained how one finds a trusted Shopify Expert, given that I clearly cannot rely on 5* reviews - this rogue expert currently has 65 of them.

Shopify Partner
257 31 132

Up to a certain extent, its up to the consumer to choose their service providers and veto them for the qualities they want.

Often, I will explain to possible clients the intricate details of pagespeed optimization, how I will charge 200 usd to get their score up to 30 from a score of 1, and they say  "It must b e 90+!" and go find someone who promises them that, probably with the cloaking method.

Go to

and study up as much as possible so you['re educated on how it works, and then when hiring someone, ask them specific questions.


Available for pagespeed consulting
32 0 22

Thanks for responding but again, you too are missing my key points:

- I go to experts so that I don't have to spend time reading up to the point where I can ask probing questions and perhaps even code solutions myself. It's called delegation - my time is better spent searching for new products, marketing and updating web-site content.

- If there were no crooks amongst the Shopify Experts community, I could rely upon the reviews system to inform decisions to engage.

Shopify wont be reading this of course, and I suspect the techies have got bored now because they have read so many post like this before - I guess I'll ask for my money back and take a chance with the next snake oil salesman.

36 1 20

try this app it works, test my site if you like... 

The small changes we make today, make greater changes for our future.

Not applicable

Hi @Chrayley 

Aibek is here from

So sad to hear your disappointment in Shopify Experts and I agree with you that 5* reviews don't give trust in their services. 

Instead of this, try request to send you examples of their "real work with real examples". 

In our approach with customers in our agency, we always show our recent works and differences before and after optimization. 

Malicious code and undermining work of others, this is not the professional attitude of true experts. 

If you wish, we can investigate your store and find is there is a real optimization takes place or just a few modifications to your code to avoid PSI crawling robot. 

Hope that will restore a little your trust in experts.


32 0 22

They did provide examples of speed improvement - the problem with their approach is that it appears to work!

Not applicable

In that case, it's really strange. 

Can you please share URL of your shop, so we can investigate this further and we will have more details?

In this thread, we already helped one merchant with the same problem, take a look here


32 0 22

Your help may be genuine, but I note that the App that you're promoting in that post has no reviews, is free and is the only App you have produced so far - aside from having grounds to question your business model, you're expecting me to jump on board with somebody that has even less credibility than the scammer I originally fell for!

This goes to the heart of my point - who can you trust amongst Shopify Experts (and these Shopify Communities for that matter)? Shopify facilitate both but have little more than reactive control over either.