Creating Rules¶
Rules are the core of Adwize monitoring. They define what conditions to watch for and how urgently to alert you.
Creating a Rule via the UI¶
- Go to the Rules page.
- Click Create Rule.
- Fill in the rule configuration:
- Name — A descriptive name (e.g., "Purchase Missing Transaction ID").
- Rule Type — Threshold, Missing Field, or Volume.
- Config — Type-specific parameters (see Concepts > Rules for details).
- Tags — Optional labels for organization.
- Category — Optional grouping.
- Click Save.
The rule becomes active immediately and is evaluated on the next 15-minute cycle.
Creating a Rule via the AI Assistant¶
Open the AI Assistant chat (floating button, bottom-right corner) and describe what you want in plain English:
"Alert me if there are more than 50 page views in 15 minutes"
The assistant creates the rule configuration for you. Review the generated config and confirm.
You can also ask the assistant to analyze your monitoring gaps — it compares your event types against existing rules and suggests what you should be covering. Try: "What should I be monitoring?"
Creating a Rule via the API¶
curl -X POST https://api.getadwize.com/api/v1/rules/ \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "High Error Rate",
"rule_type": "threshold",
"config": {
"event_type": "error",
"field": "count",
"operator": ">",
"value": 10,
"window_minutes": 15,
"severity": "critical"
}
}'
Rule Examples¶
Detect broken tracking¶
{
"name": "Purchase Missing Transaction ID",
"rule_type": "missing_field",
"config": {
"event_type": "purchase",
"required_fields": ["transaction_id"],
"severity": "critical"
}
}
Detect traffic anomalies¶
{
"name": "Page View Volume Drop",
"rule_type": "volume",
"config": {
"event_type": "page_view",
"threshold_percent": -50,
"current_window_minutes": 60,
"comparison_window_hours": 24,
"severity": "warning"
}
}
Detect too many failures¶
{
"name": "High Payment Failures",
"rule_type": "threshold",
"config": {
"source": "gtm",
"event_type": "payment_failed",
"field": "count",
"operator": ">",
"value": 10,
"window_minutes": 60,
"severity": "critical"
}
}
Managing Rules¶
- Edit — Click a rule on the Rules page to update its configuration.
- Disable — Toggle a rule inactive to pause evaluation without deleting it.
- Delete — Remove a rule permanently. Existing alerts from this rule are not deleted.
- Filter — Use tags and categories to find rules quickly.