Connecting Gravity Forms to Matomo
Gravity Forms stores the entry in your own WordPress database, which makes it one of the easier sources to join correctly. Matomo can be self-hosted with no third party in the chain, which makes it the one analytics destination where the data genuinely never leaves infrastructure you control. The join between them succeeds or fails on one thing: whether the first-party visitor ID reaches the Gravity Forms entry before the conversion happens, because Matomo can only match a conversion it can tie back to a click it recognizes.
Free30 minutesNo obligation
Specific to this pair
Gravity Forms goals in Matomo from the server, on the same visitor
Read Matomo's visitor ID from its first-party cookie into a hidden field, then send a goal through the HTTP Tracking API from the submission hook so it lands on the campaign visit. Send paid forms as orders with the entry ID as order ID, and track form ID as a dimension. On self-hosted setups, send asynchronously so submissions don't slow.
Matomo and Gravity Forms often live on the same server, sometimes in the same WordPress install through the Matomo for WordPress plugin, which makes this one of the shortest pipelines possible. The join is the visitor ID from Matomo's first-party cookie: read it into a hidden field at submit, then send a goal conversion through the HTTP Tracking API from the submission hook with that visitor ID, so the goal lands on the visit that came from the campaign.
Send the form as a goal, not an ecommerce order, unless the form takes payment. If it does take payment through a Gravity Forms payment add-on, send it as an order with the entry ID as the order ID, which also protects you from double counting when the confirmation page is refreshed. Track the Gravity Forms form ID as a custom dimension or event name so each form can be reported separately.
The specific failure on self-hosted setups is load. Matomo inside WordPress shares PHP workers and often the database with the site; a busy campaign day that floods forms can also back up the tracking request inside the submission hook and make submissions slow. Send the tracking request asynchronously or queue it, and check archiving is running before trusting any day's goal count.
Gravity Forms → Matomo · what breaks
Why this join usually fails — Gravity Forms → Matomo
- 01
The first-party visitor ID never reaches Gravity Forms
The identifier must be written into a hidden field with dynamic population enabled, and that only works if the parameter is on the URL when the page renders. Page caching serves a cached render to the visitor, so the dynamic population never runs — the same caching problem that breaks WooCommerce.
- 02
Dynamic population fails silently under page caching
The field is configured correctly and still arrives empty, because the visitor was served a cached page rendered for someone else. This is the most common Gravity Forms failure and it looks like nothing is wrong.
- 03
Owning the pipeline means owning the outage
The advantage is that nothing blocks it. The cost is that when the tracking database fills or falls behind on a weekend, the data is gone and no vendor is paging anyone. Hosted tools fail more visibly.
- 04
Nothing reconciles afterwards
Matomo exposes raw visit logs, so you can inspect the actual hit rather than an aggregate. Check the log, and check ingestion lag alongside it.
Gravity Forms → Matomo · the fix
What working looks like — Gravity Forms → Matomo
The first-party visitor ID on every entry
Conversions arriving in Matomo
The event lands in your own database and is queryable directly, including the raw log, which most analytics products do not expose.
Reconciled against the source
Gravity Forms → Matomo · architecture
How Gravity Forms and Matomo actually connect
- 1
Gravity Forms holds the truth
The entry lives in your database with every field value attached. You can query it, back it up and reconcile against it without depending on any third party, which is a real advantage over hosted form tools.
- 2
Matomo needs a click to match
The site ID, the visitor identifier and the event or ecommerce order. Self-hosted instances additionally need the tracker endpoint reachable and the database keeping up, which hosted tools do not fail at.
- 3
The identifier is the bridge
The first-party visitor ID, captured at the visit and carried into the Gravity Forms entry.
- 4
The event source decides reliability
Fire server-side from the PHP hook. This runs regardless of caching, AJAX submission, or what the confirmation page does.
- 5
Deduplication at the destination
Matomo deduplicates ecommerce orders on order ID. Without one, a refreshed confirmation page records a second order.
Gravity Forms → Matomo · normal or broken
Working vs. broken, side by side — Gravity Forms → Matomo
Normal, not a fault
The first-party visitor ID present on the entry
Sent from the gform_after_submission hook
Deduplicated correctly
Matomo deduplicates ecommerce orders on order ID. Without one, a refreshed confirmation page records a second order.
Reconciles with the source
Actually broken
The first-party visitor ID missing on most records
The identifier must be written into a hidden field with dynamic population enabled, and that only works if the parameter is on the URL when the page renders. Page caching serves a cached render to the visitor, so the dynamic population never runs — the same caching problem that breaks WooCommerce.
Sent from the browser
The field is configured correctly and still arrives empty, because the visitor was served a cached page rendered for someone else. This is the most common Gravity Forms failure and it looks like nothing is wrong.
Counted twice, or not at all
The advantage is that nothing blocks it. The cost is that when the tracking database fills or falls behind on a weekend, the data is gone and no vendor is paging anyone. Hosted tools fail more visibly.
Nobody has reconciled it
Gravity Forms → Matomo · diagnose
Diagnostic order — Gravity Forms → Matomo
- 01
Count entrys carrying the first-party visitor ID
- 02
Follow one real conversion end to end
- 03
Submit a test entry through a cached page
Not through a logged-in admin session, which bypasses the cache. If the hidden field is empty on the cached path and populated on the admin path, caching is your cause.
- 04
Check tracker reachability and database lag before debugging any tag
On self-hosted analytics the answer is infrastructure more often than instrumentation.
- 05
Read the match rate, not the success message
Matomo exposes raw visit logs, so you can inspect the actual hit rather than an aggregate. Check the log, and check ingestion lag alongside it.
Gravity Forms → Matomo · prove
How it gets proven — Gravity Forms → Matomo
Source of truth
The Gravity Forms entries list for the same window, or the wp_gf_entry table directly.
- The first-party visitor ID confirmed present on a live entry.
- Orders reconciled against the Matomo ecommerce log with order-ID deduplication verified.
- Entry meta confirmed populated on a submission made from a fully cached page as an anonymous visitor.
Gravity Forms → Matomo · free audit
What we check in the free audit
- Count entrys carrying the first-party visitor ID
- Follow one real conversion end to end
- Submit a test entry through a cached page
- Check tracker reachability and database lag before debugging any tag
- Read the match rate, not the success message
Checked against
The Gravity Forms entries list for the same window, or the wp_gf_entry table directly.
Free30 minutesNo obligation
Gravity Forms → Matomo · when not to buy
When you don't need this — Gravity Forms → Matomo
- Measure identifier coverage yourself first — pull your last hundred entrys and count how many carry the first-party visitor ID.
- If your site has no caching layer and one form, a developer can wire this in an afternoon. Worth trying before hiring anyone.
- If you have no privacy or ownership requirement and no team to run it, a hosted product removes the only real cost of this one.
Gravity Forms → Matomo · what we deliver
What gets built — Gravity Forms → Matomo
Identifier capture into Gravity Forms
Hidden field with 'allow field to be populated dynamically' enabled and a parameter name set, plus a cookie fallback via a gform filter so the identifier survives a visitor who browsed several pages before converting.
Event source: the gform_after_submission hook
Fire server-side from the PHP hook. This runs regardless of caching, AJAX submission, or what the confirmation page does.
Dispatch to Matomo
The Matomo HTTP Tracking API, posted server-side from your order system.
Reversals where they exist
Nothing to reverse, though entries marked spam should be excluded from the send.
Written guarantee
95%+ tracking accuracy
Measured against The Gravity Forms entries list for the same window, or the wp_gf_entry table directly.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
Gravity Forms → Matomo questions, answered
Capture the Matomo visitor ID into a hidden field and send a goal through the HTTP Tracking API from the after-submission hook with that ID.
Check that archiving ran and that the tracking request did not time out inside the submission hook before looking at the form.
Almost always because the first-party visitor ID never reached the Gravity Forms entry. The identifier must be written into a hidden field with dynamic population enabled, and that only works if the parameter is on the URL when the page renders. Page caching serves a cached render to the visitor, so the dynamic population never runs — the same caching problem that breaks WooCommerce. Measure coverage before debugging the dispatch.
Matomo sets its own first-party cookie and, when self-hosted on your domain, is not a third-party request at all. That means ad blockers and browser tracking-prevention affect it far less than a hosted analytics tag — one of the few genuine measurement advantages available under current privacy conditions.
The gform_after_submission hook. Fire server-side from the PHP hook. This runs regardless of caching, AJAX submission, or what the confirmation page does.
Matomo exposes raw visit logs, so you can inspect the actual hit rather than an aggregate. Check the log, and check ingestion lag alongside it.
More on Gravity Forms → Matomo
- Gravity Forms → Google AdsConnecting Gravity Forms to Google Ads
- Gravity Forms → MetaConnecting Gravity Forms to Meta Conversions API
- Gravity Forms → GA4Connecting Gravity Forms to GA4
RELATED GUIDES
Where Gravity Forms → Matomo fits in the rest of your tracking
- Contact Form 7 → MatomoConnecting Contact Form 7 to Matomo
- Formstack → MatomoConnecting Formstack to Matomo
- Ninja Forms → MatomoConnecting Ninja Forms to Matomo
- Gravity Forms → GA4Connecting Gravity Forms to GA4
- Gravity Forms → AmplitudeConnecting Gravity Forms to Amplitude
- Law firmsConversion tracking for law firms, without sending case details anywhere
- Formidable Forms → MatomoConnecting Formidable Forms to Matomo
- Cognito Forms → MatomoConnecting Cognito Forms to Matomo
Free · 30 min
Get Gravity Forms and Matomo joined properly
Free30 minutesNo obligation
