Skip to content

Identify your subscribers

dlserve can store your own data on each push subscriber so you can recognise them as your user and group them later. There are two kinds of value:

  • External ID — your own user identifier (the key in your database/CRM). One per subscriber. Use it to match a dlserve subscriber back to your records.
  • Tags — short labels you'd want to group by later, like plan or interest.

Both are optional, and you can set them at any time — typically right after the visitor logs in, once you know who they are. Updating them does not re-subscribe the user.

How to set them

Your install snippet already loads dlserve. Make sure the small queue stub is present before the SDK script (it lets you call dlserve even before it finishes loading):

html
<script>
  window.dlserve = window.dlserve || function () { (window.dlserve.q = window.dlserve.q || []).push(arguments); };
</script>
<script src="https://cdn.dlserve.ai/sdk/<your-channel-id>.js" async></script>

Then call it whenever you know something about the user:

js
// after login
dlserve('setExternalId', 'user_12345');

// set or update labels (these MERGE with any existing tags)
dlserve('setTags', { plan: 'pro', interest: 'sports' });

// remove a tag by setting it to null
dlserve('setTags', { interest: null });

That's it — the value is saved and attached to this subscriber automatically.

Tags: do's and don'ts

Tags are for labels you'd group by, not for unique values.

✅ Good tags (low-cardinality)❌ Don't put in tags
plan: "pro"a user ID (use External ID)
interest: "sports"an email or phone number (PII)
cohort: "2026-q2"a timestamp or order number
country_tier: "1"anything unique per user

Never put personal data (email, name, phone) in tags or External ID. Keep them to non-personal identifiers and labels.

Limits: up to 20 tags per subscriber; tag keys ≤ 64 characters, values ≤ 128; External ID ≤ 256 characters. Calls that exceed these are ignored.

Recipes

E-commerce — segment by plan and lifetime value band:

js
dlserve('setExternalId', shop.customerId);
dlserve('setTags', { plan: shop.plan, ltv_band: shop.ltvBand });   // e.g. "pro", "high"

Content site — segment by interests:

js
dlserve('setTags', { interest: article.topic, member: user.isMember ? 'yes' : 'no' });

A/B cohort — tag the experiment bucket:

js
dlserve('setTags', { exp_homepage: bucket });   // "a" | "b"

Coming soon: filter your reports and target your sends by these tags. For now they're stored on each subscriber, ready for when that lands.