sGTM Containers

Data Store for Server-Side GTM

A built-in JSON database for your server container: keep order IDs, click IDs, customer data and consent, and read them back from your tags.

4 min readUpdated Oct 19, 2026FlyNode docs
Browse documentation

Need a hand?

Can't find your answer? Our team replies fast.

Contact support

The Data Store is a small NoSQL database that lives next to your server container. Your tags and variables read and write it in a few milliseconds. You use it to remember things between requests: a purchase you already sent, a click ID from the landing page, the email of a returning customer, the consent a visitor gave.

It is on every paid Server-Side GTM plan, in the Data Store tab of your container.

Turn it on

  1. Open your container and go to the Data Store tab.
  2. Press Activate Data Store. Your container restarts once.

From then on FlyNode adds one request header, x-flynode-store, to every request that reaches your container. It holds the address of your store (with your key), so the FlyNode templates know where to read and write and you type nothing in.

Use it from Google Tag Manager

Three ready-made templates come with the Data Store. Download them from the tab (or here) and import them into your server container: Templates, then Tag Templates or Variable Templates, New, the three-dot menu, Import.

TemplateTypeWhat it does
FlyNode Data Store WriterTagWrites a document. With a document key, the same key updates the same document (merged into it, or replacing it, as you choose). Without a key, each event adds a new document. You can store all the event data, a timestamp and any fields you list; a dot in a field name makes a nested field (user.email).
FlyNode Data Store LookupVariableReads a document by its key, or the first document that matches conditions on its fields. Returns the whole document or one field (user.email). It can remember the answer for a few minutes.
FlyNode Data Store reStoreVariableFinds the visitor's document by any identifier (email, phone, client ID, _ga), fills the fields the event lacks from the store and saves what is new, so the identifiers of a visitor grow over time.

Pick a collection name in the template, preview a request, and watch the document appear in the Data Store tab. A template can also use another container's store: paste that container's store address (shown under Call the API yourself) into Store address.

Collections and documents

  • A collection is a folder for one kind of data, for example orders or sessions. Every container has a default collection.
  • A document is a JSON object with a unique key inside its collection. It can hold text, numbers, true/false, lists and nested objects, up to 1 MB.
  • Retention (TTL): a collection can delete its documents some hours after the last edit. The default is to keep them until you delete them.

The Data Store tab

Three columns: collections, the documents of the chosen collection, and the fields of the chosen document. You can add and delete collections and documents, add or delete a field, or edit the whole document as JSON. The filters at the top find a document by its key, by the value of a field (up to 5 conditions: ==, !=, <, <=, >, >=, contains, does not contain; use user.email to reach a nested field), or by the date it was created or last edited. Export saves a collection as a CSV; Import adds the rows of a CSV (the first line holds the field names, a column called key sets the document key).

Limits

PlanDocumentsStorage
Pro50,000100 MB
Business500,0001 GB
Enterprise5,000,0005 GB

When a container is full, writes fail with a message until you delete documents or upgrade. Turning the Data Store off keeps your data.

The API

The templates use an HTTP API that you can call yourself, from a backend or a script. The address, with your key, is shown under Call the API yourself at the bottom of the Data Store tab:

https://api.flynode.io/flynode-api/YOUR_STORE_KEY/v2/store

Keep the key private. Send JSON. Every answer is { "success": true, "data": ... } or { "success": false, "error": { "message": ... } }.

RequestDoes
GET /collectionsList collections.
POST /collections with {"collection_name":"sessions","ttl":{"duration_hours":24,"reference_field":"updated_at"}}Create a collection.
PATCH /collections/NAME, DELETE /collections/NAMEChange the retention, or delete a collection and its documents.
PUT /collections/NAME/documents/KEYAdd a document, or replace it with the body you send.
PATCH /collections/NAME/documents/KEYMerge the body into the document.
GET /collections/NAME/documents/KEY, DELETE ...Read or delete one document.
POST /collections/NAME/documents with {"filter":{"operator":"and","conditions":[{"field":"email","operator":"equal","value":"a@b.com"}]},"pagination":{"limit":10}}Find documents. Operators: equal, not-equal, lt, lte, gt, gte, contains, not-contains, array-contains-any.

Good to know

  • Do not put anything in the store that you may not keep (full card numbers, passwords). Store hashed emails and IDs where you can.
  • Documents of a deleted container are deleted with it.
  • Each container has its own store; stores are not shared between containers unless you give a template another container's address.

Still stuck?

Open a support ticket from your dashboard and include the container name.

Contact support