Does Google Tag Manager container automatically update? If so, how / where?

I don’t understand if Google Tag Manager is Containerautomatically updated, and if so, how.

The documentation states:

By default, your container can be updated every 12 hours. To manually update the container, use ContainerHolder.refresh():

ContainerHolderSingleton.getContainerHolder().refresh();

This is an asynchronous call that will not return immediately. To reduce network traffic, it refresh()can only be called once every 15 minutes, otherwise it will be no-op.

This "becomes available for updates every 12 hours" in combination with the "Update manually" part, which disables me. Therefore, I have two questions:

  • Does Google Tag Manager try to update Containerevery 12 hours?
  • If the answer to # 1 is yes, then where / how is this happening?

My guess at this point is that the answer to # 1 is "Yes."

It bothers me that I'm not sure where this automatic update occurs, and I only go to getContainer()in ContainerAvailableListenerand then cache the values. Therefore, if this is a call getContainer()that launches an update, for example, when a new container is “replaced”, my implementation may not be refreshing.

Change: . My reason is that the life of my application can be quite long. I am trying to determine if I need to update containers in my code or not.

+4
source share

Source: https://habr.com/ru/post/1625018/


All Articles