Prerequisites
Assertion Hub QA Account. Start Free Trial
What are Test and Triggers?
A Test validates a combination of metrics and only fires when its associated Trigger condition is met.
A Trigger defines conditions that activate tests (e.g. “event_name contains page_view AND account_id equals G-123X”).
Each metric has three fields: Metric Key (e.g. item_name), Comparison (e.g. includes, exists), and Expected Value (e.g. T-shirt, pc).
How to create a Test?
Create tests in three ways:
- From a collected event - Click detected events (e.g. “add_to_cart”) during checks and select metrics to test
- From predefined templates - Import templates with pre-filled metrics when we detect matching events
- From scratch - Manually configure tests by choosing your vendor and metrics
Create Test and Triggers from request
- Click a test suite result in /admin to open the Test Suite Result page

- Expand any request group inside a step to see detected requests and click “Create Test” on your desired event

-
Name your test, add a description (optional), and choose the Logical Operator for Test and Trigger:
- OR - Any selected metric evaluates to true
- AND - All selected metrics must evaluate to true
-
Select at least one metric as Trigger and one as Test (e.g. event name as trigger and a custom dimension as test metric). You can test any parameter, object, or nested value.
-
Click “Create Test” top-right of the panel
Note: For metrics appearing multiple times (e.g. item_id across all GA4 items), click Global to test all occurrences.

Create test from template
-
As seen in the 1st step of the previous method, click on a test suite in your Admin dashboard.
-
If during the tests AssertionHub detected events matching our predefined tests, you will see a banner at the top. Click on Review and Import tests
-
Here you will see the tests to import divided by vendor. Choose what to import and click import tests top-right
-
These will be automatically created and attached on the step they were detected from updating the Test Suite.

Create a test from scratch
- Click any element in the left navbar under “Elements”
- Click “Create Trigger/Test”
- Select your vendor (e.g. GA4, Google Tag Manager)
- Name your test/trigger, add a description, and select the Logical Operators
- Click “Add Metric” and enter the Metric Path:
- Nested metrics:
pr1.item_name
- Object itself:
products
- Basic metrics:
en
(for GA4 event name) - Multiple occurrences:
item_name
checks all instances - Specific instance:
pr2.item_name
checks only that one
- Nested metrics:
- Make sure to select at least one Metric as Trigger
- Click “Create Test”
How to edit a Test and a Trigger
Go to “All Elements” in the left sidebar to view all your test suites and tests. Click the edit icon at the end of any row to open the edit panel.