Moving most scripts to Google Tag Manager to improve loading times

Highlighted
Shopify Partner
15 0 2

Hi!

I'm in the process of optimizing the speed of our store to improve conversions and SEO. 

Since a big chunk of the loading and rendering time comes from all the scripts that gets loaded, I was thinking to move most of the scripts to Google Tag Manager to get more control over load order and reduce the number of queries. 

 

I haven't started with digging into the scripts with dynamic liquid code yet, but I guess I'll figure it out eventually. 

 

Has anyone else done something similar? Anything I should be aware of? Do you think the speed will improve?

0 Likes
Highlighted
Shopify Partner
2294 116 353

Do NOT do this for non-marketing related "tags"  if this is a store in production or a store you will be handing over. 

If this is for most marketing scripts, sure that's the point of GTM

 

Problems:

#1 don't muddle analytics with other theme functionality

#2 adblockers exist

#3 optimization is easier the less domains involved

on and on

This can lead to invisible undetectable problems where for you and tests everything seems fine but there's a hole in the ship somewhere losing air.

 

to get more control over load order and reduce the number of queries

... I haven't started with digging into the scripts with dynamic liquid code yet, but I guess I'll figure it out eventually. 

If this idea is because your not experienced with shopify themes yet take that as a clue that this is a risky experiment for a business.

Learning themes and Learning optimization are two different things and there are tons of post on different methods people are using to optimize shopify themes, schedule accordingly.

 

Do you think the speed will improve?

It could , are you prepared to invest excessive time and money to support a hack?

 

As an experiment to toy around with and find specific use cases I think it's a fun thing to try , but not for production unless your  going to dedicate time to it or already experienced doing optimizations on other platforms, or a ninja with javascript and need to do stuff during the checkout 

Problem Solved? ✔️Accept and ? Like the solution so you can help others.
Buy me a coffee ☕ paypal.me/paulnewton or donate to eff.org
Confused? Busy? Buy a custom solution paull.newton+shopifyforum@gmail.com
0 Likes