---
title: "Create / Transform Events Server-Side"
description: "Event Creation Rules let you automatically create or transform tracking events based on data arriving in Tracklution without changing your website code or dataLayer. You define the logic once, and Tracklution applies it to every matching event in real time. Common use cases include remapping webhook fields to standard event fields, splitting a single event type by order source, optimizing ad platform conversions on profit instead of revenue, and filtering out test or internal…"
slug: "create--transform-events-server-side"
category_slug: "tracking-guides"
category_name: "Tracking Guides"
order: 3000000057
published_at: "2026-04-14T10:50:15+00:00"
updated_at: "2026-04-14T11:55:58+00:00"
language_code: "en-US"
tags: []
---

Event Creation Rules let you automatically create or transform tracking events based on data arriving in Tracklution without changing your website code or dataLayer. You define the logic once, and Tracklution applies it to every matching event in real time.

Common use cases include remapping webhook fields to standard event fields, splitting a single event type by order source, optimizing ad platform conversions on profit instead of revenue, and filtering out test or internal orders.

:::Info
Event Creation Rules is a **beta feature**. Rules run directly in the live event collection pipeline. Test carefully before applying rules to production traffic. See [Before you start](#before-you-start) below.
:::



## Before you start

When you create your first rule, Tracklution shows a disclaimer you must acknowledge before proceeding. It covers four points you should keep in mind throughout:

1. **Production impact**: Rules run in the live event collection pipeline. A misconfigured rule can create unexpected events, alter conversion values, or discard original events.
2. **No undo**: Once an event is discarded or a synthetic event is delivered to connectors, it cannot be reversed.
3. **Testing recommended**: Test rules with low-traffic events or in a staging container before applying them to production traffic.
4. **Beta limitations**: The feature is under active development. Behaviour may change, and edge cases may not be fully handled yet.
 
 ![event_rules_disclaimer.jpg](https://support.tracklution.com/kb/agent/attachment/article/57/inline?token=eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjE4NCIsIm9yZ2lkIjoiMTQ3NzgiLCJpc3MiOiJzdXBwb3J0LnRyYWNrbHV0aW9uLmNvbSJ9.xLJ-h4W8Ynrt4E76S13GlHlKqYqdd0oFjiQJT6jB670)



## Where to find it

Go to **Settings** → **Event Creation Rules**. This area lists all existing rules with their status, source event, and output event. Use the **+ Create Rule** button in the top-right corner to add a new rule.



## How a rule works

Each rule follows this logic:

> **When** a `[SourceEvent]` event arrives **and** `[conditions are met]`, **create** a new event called `[OutputEvent]` **with** `[field mappings]`, **then** `[discard / keep]` the original event **and** `[render / do not render]` a pixel for the new event.

Rules are evaluated as soon as a matching event arrives. If conditions are not met, the rule is skipped and the original event continues as normal.

 ![event_rules_example.jpg](https://support.tracklution.com/kb/agent/attachment/article/57/inline?token=eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjE4NSIsIm9yZ2lkIjoiMTQ3NzgiLCJpc3MiOiJzdXBwb3J0LnRyYWNrbHV0aW9uLmNvbSJ9.7OsYZWLWDR7HsM1tfqTBXYRp-vsRcJZV3oN3-ZDj5S0)



## Create a rule

1. Go to **Settings** → **Event Creation Rules**.
2. Click **+ Create Rule**.
3. If this is your first rule, read the beta disclaimer and click **I understand, proceed**.
4. In the **Rule name** field, enter a descriptive name (e.g. `Revenue Purchase`).

### Set the trigger

5. In the **When a ___ event arrives** field, enter the name of the source event that should trigger the rule (e.g. `Purchase`).

### Add conditions

6. Click **+ Add condition** to add a filter. Each condition has:
   - A **field path** (e.g. `webhook.revenue`, `webhook.source_name`)
   - An **operator** (e.g. `exists`, `equals`, `contains`)
   - A **value** (for operators that require one)
7. Repeat for each additional condition. All conditions must be true for the rule to fire (AND logic).

### Name the output event

8. In the **create a new event called** field, enter the name for the new event (e.g. `Purchase`, `PurchasePOS`, `ProfitMargin`).

### Map fields

9. Click **+ Add field mapping** to map a field on the new event to a value or expression. Each mapping has:
   - A **target field** (e.g. `value`, `currency`)
   - A **source expression** (e.g. `webhook.revenue`, `webhook.revenue-webhook.cost`)
10. Repeat for each field you want to set on the new event.

### Set the original event behavior

11. In the **Then** section, choose what happens to the original event:
    - **Discard**: the original event is dropped and not forwarded to connectors.
    - **Keep**: the original event is kept and the new event is added.
12. Choose whether to render a pixel for the new event:
    - **Do not render**: the new event is delivered to server-side connectors only.
    - **Render**: the new event is delivered to server-side connectors and renders a browser pixel.

13. Click **Save**.



## Manage existing rules

On the **Event Creation Rules**, each rule shows:

| Column | Description |
|---|---|
| **Name** | The rule name and a short summary of its logic. |
| **Status** | Whether the rule is active or paused. |
| **Source Event** | The event type that triggers the rule. |
| **Output Event** | The name of the event the rule creates. |

Use **Edit** to modify a rule, **Status** to toggle active / paused, or **Remove** to delete it permanently.

 ![event_rules_active.png](https://support.tracklution.com/kb/agent/attachment/article/57/inline?token=eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjE4NiIsIm9yZ2lkIjoiMTQ3NzgiLCJpc3MiOiJzdXBwb3J0LnRyYWNrbHV0aW9uLmNvbSJ9._vbkPe9VGOv8-5RrTxog9BkSMQtJsqQTXhW9kDxIuSU)



## Example use cases

These are examples of how you can use the **Event Creation Rules** feature. You can use different names for your output event, and different trigger and condition rules that suit your use case.

### Route by order source

Split POS orders from web orders into separate events.

- Trigger: `Purchase`
- Condition: `webhook.source_name` equals `pos`
- Output event: `PurchasePOS`
- Original event: discard

### Optimise on profit, not revenue

Send margin-based values to ad platforms instead of gross revenue.

- Trigger: `Purchase`
- Output event: `ProfitMargin`
- Field mapping: `value` = `value - webhook.cost_of_goods - webhook.shipping_cost`
- Original event: keep, do not render pixel for new event

### Send VAT-excluded values to ad platforms

- Trigger: `Purchase`
- Output event: `Purchase`
- Field mapping: `value` = `value - webhook.total_tax`
- Original event: discard

### Remap webhook fields to standard fields

Useful when your webhook uses non-standard field names.

- Trigger: `Purchase`
- Output event: `Purchase`
- Field mappings: `value` = `webhook.revenue`, `currency` = `webhook.currencyCode`
- Original event: discard

### Track affiliate conversions separately

- Trigger: `Purchase`
- Condition: `source_alias` equals `affiliate`
- Output event: `PurchaseAwin`
- Original event: keep, render pixel for new event

### Identify first-time buyers

- Trigger: `Purchase`
- Condition: `webhook.isFirstOrder` equals `true`
- Output event: `NewCustomerPurchase`

### Exclude test orders

- Trigger: `Purchase`
- Condition: `event_source_url` contains `staging.myshop.com`
- Output event: `PurchaseTest`
- Original event: discard



## Limitations and known behavior

- Event Creation Rules is in **beta**. Edge cases may not behave as expected, open a chat to contact support if you have unexpected issues.
- Rules cannot be undone. Discarded events and delivered synthetic events are permanent.
- Not yet available on all servers, open a chat to contact support if you want to use this feature but can't find it.
