# Built-in checks, duplicates and global rules

> The checks AssertionHub runs on every hit without any setup, the duplicate events it flags, and how to add your own rule for every hit of a vendor.

Source: https://assertionhub.com/docs/built-in-checks-and-duplicates
Published: 2026-11-22

Every hit in a run is checked against a library of standard checks, taken from each vendor's documentation. You don't set them up. For anything specific to your site, add a global rule.

## What is checked

**GA4**
- Every hit has a measurement ID and a consent state (`gcs`).
- `purchase` has `transaction_id`, a currency, a valid three-letter currency code, a numeric value, items, and an `item_id` on every item. Its value has to match the items' total, with or without shipping and tax; a note when it includes them, since Google wants shipping and tax in their own parameters.
- `view_item`, `add_to_cart`, `remove_from_cart`, `begin_checkout`, `add_shipping_info` and `add_payment_info` have items with an `item_id`. `add_shipping_info` has a shipping tier.

**Meta Pixel**
- Every hit has a pixel ID.
- `Purchase` has a currency, a valid currency code, a numeric value, `content_ids`, and a quantity on each item. `ViewContent`, `AddToCart` and `InitiateCheckout` have `content_ids`.

**Google Ads, Microsoft UET, Pinterest**: every hit has its conversion or tag ID.

**dataLayer (GTM)**: the same ecommerce checks as GA4 on the pushes, plus a note when a push uses the old Universal Analytics ecommerce format or a format that isn't the standard one.

**Any vendor**
- A parameter whose value is a placeholder (like `{{value}}`) is an error.
- A parameter set to the text `undefined` or `null` is a note, as are empty values and empty lists: vendor libraries send many of these by design.
- A hit with no parameters at all is a warning.

Consent is checked too, on every hit: see [How consent is checked](https://assertionhub.com/docs/consent-checks).

## Duplicates

Some events must not repeat. AssertionHub flags:

| Event | Counted as a duplicate when |
|---|---|
| GA4 `purchase` | the same order appears twice anywhere in the run, for example after reloading the confirmation page |
| GA4 `page_view` | it fires twice on one step for the same property |
| GA4 `add_to_cart`, `select_item` | the same product, twice on one step |
| GA4 `refund` | twice on one step |
| Meta `Purchase` | two hits on one step share an `event_id` |
| Google Tag Manager | the same container is installed twice on one page, for example pasted in the theme and added again by a plugin |

A purchase counted twice inflates revenue in GA4 and feeds the same order twice to bidding.

A container installed twice is an error in every journey and Site check, so it fails the step and sends the journey's alert. Remove the extra install, then compare the page's hits in the next run.

## Global rules: your own check on every hit

A test checks one event on one step. A global rule checks every hit of a vendor, on every step of every journey. Use it for what must always be true:

- every GA4 hit goes to your measurement ID, never an old one;
- `currency` is always three capital letters;
- every Meta hit carries your pixel ID (`id`) and no other.

To create one:

1. Open **Global Rules** in the sidebar.
2. Under **Vendors**, add the vendor the rule is for.
3. Add a check: the parameter, the comparison, the expected value. The same comparisons as in tests: **equals**, **contains**, **starts with**, **Matching Regex**, **exists**, **greater than** and the others.
4. Optional: list event names the rule skips, for example events your consent tool sends.
5. Save. The rule runs from the next run.

Failed global rules show on the result like any other check, with the rule's name.

A rule on `items[].price` checks the price of every product in the hit. When you make a field global from the test editor, AssertionHub writes it this way for you.

**Global rule or test?** A global rule is true for every hit of the vendor, wherever it fires. A test is true for one event on one step, with how many times it must fire. See [How to create Tests and Triggers](https://assertionhub.com/docs/how-to-create-test-and-triggers-assertionhub).

## When a check doesn't apply to you

Click **Ignore** next to it and choose this journey or every journey. It stops being reported on new runs; the data is still collected. See [Ignore list and Not collected](https://assertionhub.com/docs/ignore-list-and-not-collected).
