Tag Manager: How to load binary default container?

后端 未结 1 1091
时光取名叫无心
时光取名叫无心 2021-02-20 02:13

I\'m trying to set up Google Tag Manager as per the Getting Started guide.

When adding a default container, the docs make it clear that using binary def

1条回答
  •  情深已故
    2021-02-20 02:40

    Sorry for the late answer. Had some struggles with Tag Manager and managed to solve mine. Hope this helps:

    Yes, it is possible to use a binary default container. The documentation is conflicting with a previous version of Tag Manager. I believe it's conflicting with v3. (The current version as of writing this answer is v4).

    To load the binary container you need to use a different method.

    You need to use TagManager.loadContainerDefaultOnly() this method is intended specifically for testing purposes so that you could test if a container is sending hits even with no container published.

    On the other hand TagManager.loadContainerPreferNonDefault() will load it's binary container and then check the network for a version that is currently published. If it finds a version that is published it will use that version no matter what binary container you have. Example:

    You add binary container version15. However you have version14 published. This method will default to 14, since that version is published.

    If you wanted to test version 15 you would have to use TagManager.loadContainerDefaultOnly().

    0 讨论(0)
提交回复
热议问题