Limited-time sale on all Analytics Mania's courses!

Learn more
  • Courses
    • 🔥 SALE 🔥
    • Courses
    • Course bundles
  • Blog
  • Resources
    • Youtube channel
    • E-books and Guides
    • GTM Recipes
    • View All Resources
    • GTM Community
    • GA4 community
  • Services
  • About
    • About
    • Contact
  • Login
  • Courses
    • 🔥 SALE 🔥
    • Courses
    • Course bundles
  • Blog
  • Resources
    • Youtube channel
    • E-books and Guides
    • GTM Recipes
    • View All Resources
    • GTM Community
    • GA4 community
  • Services
  • About
    • About
    • Contact
  • Login

Google Tag Manager Cache Buster gtmcb

Google Tag Manager Cache Buster (gtmcb) Explained

TL;DR version. A gtmcb parameter is a setting used in a Custom Image Tag. It’s basically a random number which is added to the image pixel every time it is loaded. And you do not have to configure it because it is a default functionality. Continue reading to learn more.

P.S. if you still have difficulty understanding what a gtmcb is, read this guide about Custom Image Tag.


One of the reasons why websites are loading fast enough is the cache. It is a temporary storage location on your computer for files (CSS style sheets, JavaScript scripts, Images, etc.) downloaded by your browser to display websites.

When you revisit a website, the browser checks which content was updated in the meantime and only downloads updated files or everything that is not already stored in the cache. This reduces bandwidth usage on both the user and server side and allows the page to load faster.

Faster page load time, yay! That sounds awesome, right?

For the end user, yes. For the marketer/digital analyst/conversion specialist, not always.

Let me explain why.

If you didn’t use the cache busting, your Custom Image Tag would work only the first time it loads. On the second loading attempt, no data would be transmitted to the receiving server. Why? Because the image would be already saved in the cache and would be loaded from the browser’s internal storage instead of an external server.

This means that the newest data will not reach the target, e.g., Facebook Pixel’s server.

 

 

So what’s the solution? Well, the image’s URL must be unique every time it is loaded, and that’s where the Cache Buster comes in handy.

Cache Busting Query Parameter (gtmcb) is a function that returns a string of random numbers every time a Custom Image Tag fires and adds it as a query parameter to the Image URL, e.g., https://www.pixelreceiver.com/track?parameter1=usa&gtmcb=1199950751.

Every time a gtmcb is called, it returns a different value, the Image URL will always be different (which is good because you’ll avoid browser cache).

So, what should you do regarding the gtmcb parameter in Custom Image Tag settings? Nothing, actually. Leave it as it is. Google Tag Manager recognizes this function and automatically adds the unique number to the Image URL.

 

How Can I Test Google Tag Manager with gtmcb?

The entire testing workflow is explained in a much more comprehensive guide about the Custom Image Tag where gtmcb (Google Tag Manager Cache Buster) plays an important role.

READ THE GUIDE: CUSTOM IMAGE IN GTM
Subscribe and Get the Ebook - Mastering GA4 event tracking
Hi, I'm Julius Fedorovicius and I'm here to help you learn Google Tag Manager and Google Analytics. Join thousands of other digital marketers and digital analysts in this exciting journey.Read more
Analytics Mania
  • Google Tag Manager Courses
  • Google Tag Manager Recipes
  • Google Tag Manager Resources
  • Google Tag Manager Community
  • Login to courses
Follow Analytics Mania
  • Subscribe to newsletter
Recent Posts
  • Conversion rate in Google Analytics 4
  • Google Tag Manager Data Layer Explained
  • Cross-domain tracking in Google Analytics 4
Analytics Mania - Google Tag Manager and Google Analytics Blog | Privacy Policy
Manage Cookie Settings