What is GTM Container Size Limit Error or Too Large Workspace Error?

In this article, I’ll introduce a common error which nowadays many of our clients faces. In this article, I will take you through this error and how to check and solve this commonly occurring error in the GTM.

An error looks something like below:


As we can see, the error description mentioned that container became too large and size need to be reduced. After looking at this error the question comes to our mind are “what is the size of the container?”, “how to reduce it?” etc.

What is the size of the container?

The size limit of the container is 200kb. Another question is how you can find your container size.

Firstly visit the website where your GTM container has been placed, inspect element, go to network tab, search for a gtm.js. If you see the gtm library size is more than 200kb then you are in trouble and your GTM container will throw an error. Please check the screenshot below for your reference.


How to reduce the size of the container?

The only way is to reduce some Tag/Trigger/Variable, especially custom HTML tag and custom javascript variable which usually fill up large size of the container. It’s usually not the tags that take you across the limit but your variables and triggers. You need to put the container on a diet: use variables to decrease the number of Tags you need, if they differ only by a value or two, for example. If you have multiple similar triggers (e.g. click, form submit, usually using RegEx to match multiple values can make a single Trigger replace a whole bunch of them. With Custom JavaScript Variables, you can add an incredible amount of dynamic power into the container with a very small number of variables.

Some people may argue that all Tag/Trigger/ Variable are important and we can’t delete any of them.

My answer to them is, I’ve seen many, many containers which have been at or near the size limit, and never has there been a situation where nothing could be deleted. A bloated container is always a symptom of creating too many near-duplicates when a single Tag/Trigger/Variable with a dynamic value would have sufficed. So you need to take a surgeon’s knife to the container and start cutting out the redundant stuff.

Also note that Container size warning is always about a single version, most likely your most recent version or your published version (often they’re the same thing. Deleting container history won’t affect the size warning.

Let me know in the comments if you can think of other ways to solve this issue! Always happy to delegate actual analytics work to people wiser than me.

You may also like...

Leave a Reply