Stape
Search
Try for free

Firestore Request Delay tag for Google Tag Manager server container

Updated
Sep 9, 2024
Published
Sep 6, 2024

Firestore Request Delay tag allows you to delay the processing of events in Google Tag Manager (sGTM) by fetching, replaying, or storing events within Firebase Firestore. This tag can be used to control when events are triggered by introducing a delay or fetching them at a later time.

What are the benefits:

  • Flexible event timing: this tag allows you to introduce controlled delays in event processing, which can be critical for synchronization with backend systems.
  • Improved error handling: if an event fails to process, it can be replayed later without losing data.
  • Optimized data collection: instead of sending individual events in real-time, this tag lets you collect and batch-process them, optimizing performance and reducing the load on servers.
  • Reprocessing capabilities: provides the ability to store and later replay data, which is useful for audit trails, debugging, or resending failed events.

The initial development of this template was done by Lars Friis, and it is now maintained by Stape.

How to install Firestore Request Delay tag for Google Tag Manager server container

2. Download Firestore Request Delay tag from GitHub or add it from Template Gallery

Import the tag to server Google Tag Manager by clicking Templates → New Tag Template → Click three dots in the top right corner → Click import → Add template that you’ve recently downloaded → Click Save.

How to install Firestore Request Delay tag for Google Tag Manager server container

3. Choose the desired functionality (Fetch Event, Replay Event, or Store Event):

  • Fetch Event: set the minimum delay, event limit, and custom output event name.
  • Replay Event: define the key and value data for replay, and custom output event name.
  • Store Event: specify the store event key and output event name.
Firestore Request Delay tag for Google Tag Manager server container

In Firebase settings, add your Firebase Project ID and define the Firestore path where events will be stored or fetched from (e.g., stape/delay).

4. That’s it! Don’t forget to click the Save button.

Conclusion

Firestore Request Delay tag for Google Tag Manager server containers offers a powerful enhancement for managing event processing within your analytics setup. This tag provides significant flexibility in controlling event timing, improving error handling, optimizing data collection, and enabling robust reprocessing options. Whether you need to introduce delays for synchronization, handle errors more gracefully, or optimize performance by batching events, the Firestore Request Delay tag has you covered.

If you need help with your account or if you’d like to learn more about the benefits of Stape, please contact our support team or find your answers in our helpdesk.

Tagged with:sGTM tag

Host your GTM server at Staperight now!