Event Specs
Datafly Signal uses a consistent set of snake_case event IDs across all verticals. These IDs are:
- The value sent in the
eventfield by Datafly.js (e.g.datafly.track('add_to_cart', {...})) - The key used in your pipeline’s Per-Event Parameters configuration
- The stable identifier used for vendor event name mapping
Using the standard event IDs from these specs means your pipelines stay compatible with pre-built blueprints and vendor mapping tables — you won’t need to manually configure the event name for each destination.
How event IDs work
Every event flowing through Signal has an event field:
{
"type": "track",
"event": "add_to_cart",
"properties": {
"currency": "GBP",
"value": 79.99,
"items": [
{ "item_id": "SKU-001", "item_name": "Running Shoes", "price": 79.99, "quantity": 1 }
]
}
}The pipeline engine looks up the event value against your Per-Event Parameters configuration. If a matching
section exists, those field mappings are applied on top of the global parameters before delivery to the vendor.
Built-in events
These events are sent automatically by Datafly.js without any track() call:
| Event ID | Sent by | Description |
|---|---|---|
page | datafly.page() | Page view. Fired automatically on each page load. |
identify | datafly.identify(userId, traits) | Links anonymous visitor to a known user. |
group | datafly.group(groupId, traits) | Associates user with a company or account. |
Common events
These optional events apply across any vertical. They’re documented here so they map consistently across destinations.
| Event ID | Description | GA4 | Meta CAPI |
|---|---|---|---|
generate_lead | A lead / enquiry was submitted (form, demo, quote). Hash PII via identify(). | generate_lead | Lead |
donation_made | A donation was completed (treated as a conversion). | purchase | Purchase |
cta_clicked | A call-to-action button was clicked. | select_content | (custom) |
element_clicked | A tracked UI element was clicked. | select_content | (custom) |
error_occurred | A client or checkout error occurred (diagnostic). | (custom) | (custom) |
user_updated | A user updated their profile or account details. | (custom) | (custom) |
Vertical specs
Choose the spec that matches your business model. You can mix events from multiple verticals — a subscription news site might use both Publishing and SaaS events.
Property conventions
All event properties use snake_case:
// Correct
datafly.track('purchase', {
transaction_id: 'ORD-1234',
value: 129.99,
currency: 'GBP',
items: [{ item_id: 'SKU-001', item_name: 'Trainers', price: 79.99, quantity: 1 }],
});
// Avoid
datafly.track('purchase', {
transactionId: 'ORD-1234', // camelCase — avoid
Value: 129.99, // PascalCase — avoid
});Standard monetary properties:
| Property | Type | Description |
|---|---|---|
revenue | number | Total revenue including tax and shipping |
value | number | Conversion value (use when revenue doesn’t apply) |
currency | string | ISO 4217 currency code (GBP, USD, EUR) |
price | number | Unit price |
Never include raw PII (email addresses, phone numbers, full names) in track() properties.
Use datafly.identify() to attach user traits — Signal hashes PII server-side before
delivering to vendors.