If you’re unfamiliar with Google Tag Manager, it’s a great product to get familiar with as it has some very powerful capabilities. It allows you to quickly add third party tags in an easily manageable UI (User Interface) without ever having to edit the source code. Non developers rejoice! In fact it is so simple to add these variables, triggers, and tags that you can quickly inflate your container’s size. We will review how to avoid this issue and what you should do in the event that you do reach your container’s size limit.

Draft Exceeds Maximum Size Allowed

Google Tag Manager Failed to Create Container Version Message

“Failed to create a container version. The container draft exceeds the maximum size allowed,” is the error you get when you’ve reached the size limit for Google Tag Manager. When I first saw this error, I scratched my head and thought, wait, in Google’s Tag Manager support forum they said there was no hard limit. So, what’s the deal?

Fortunately, our agency does so much analytics consulting work that we have a great network of Google Analytics contacts, and after some further research we ultimately got help from the head of Google’s Tag Manager product, Brian Kuhn (@briankuhn). While the limit is indeed unpublished, Brian indicated that the maximum size for a container is 200KB. Great, we’re getting somewhere now and I’m not going crazy; there actually is a limit! However, what does 200KB translate to in the number of tags? This is where things get hairy and trying to give a definitive answer isn’t realistically possible. How do you accurately translate various sized tags, triggers, and variables, into a finite number that’s less than 200KB through Google Tag Manager? In short, you can’t. So what can you do to prevent maxing out your container?

How to Prevent Maxing Our Your Container

Optimize your tags of course! This was also included in the response from Brian Kuhn as he mentioned that there are many techniques such as variables, lookup tables, and custom JavaScript to help you consolidate tags. I agree with Brian that optimizing your tags is a great practice, but when you’re using tag manager in its simplest nature of managing tags, this isn’t always an approach that works when dealing with multiple vendors with very unique tags.

Conclusion

Summary, we’ve learned that there actually is a limit to the container size for Google Tag Manager, which is 200KB. If you run into this issue, the solutions are to optimize your tags with variables, lookup tables, and custom JavaScript to help consolidate tags. Through my experience of dealing with Google Tag Manager, I would have to say your best bet is to stay under 100-150 tags, as this was the closest we got until finding a number that was over the limit.