Creating a Synchronous Container

To use synchronous tags you need to place the synchronous container on the page.  The synchronous container script allows for tags to be run both synchronously and asynchronously, and can be used in place of the asynchronous script.
Enabling the Synchronous Container
Once you have created a synchronous tag you can assign it to a container to enable that container's synchronous script.  For more information on creating synchronous tags, click here.   When the synchronous tag is assigned to the container, a new box will appear containing the synchronous container script:

This script should be placed in the head of the page as close to the top as possible.  The synchronous container can replace the asynchronous container script, and is able to load both synchronous and asynchronous elements.

Configuring the Synchronous Container

When creating a synchronous container it is important to set a proper expiration window for the container script.  The window sets how long the container will last in the users cache and while cached the user will not need to make any calls to the server.  However, while cached any updates to the synchronous tags within the container will not be fetched.  

Depending on the frequency of updates you may want to shorten or lengthen this window to ensure good performance while still being able to quickly update synchronous tags*.  The current maximum expiration window is set to one day, which means users visiting the page after an update will not see any changes to the tags until a full 24 hours after their previous visit.

*Note for testing purposes you can clear your browser cache to fetch updates to the container without having to wait for the expiration window.

Have more questions? Submit a request


Please sign in to leave a comment.