Firestore Writer with TTL Tag makes it possible to write data from Server-side Google Tag Manager to Firestore.
The unique function with this Tag is that it allows you to write TTL (Time To Live) directly to Firestore from Server-side GTM.
- Add Event Data: Send all sGTM event data to the Firestore document
- Merge document keys: Merge keys into Firestore documents
- Add Timestamp: Adds timestamp in milliseconds
- Add Time to Live: Adds TTL (Time To Live) Date and Time
Since Server-side GTM Firestore API cannot directly utilize the standard to set TTL, this custom Template sends data directly to the Firestore API using the sendHttpRequest function. Additionally, because the Server-side GTM API lacks native Date object support, the Template includes its own custom date-math routine to create and manage dates.
The functionality and look of the Tag Template is somewhat similar to the Firestore Writer Tag, and some elements have been borrowed from that Template.