Connecting SendGrid to Matomo
SendGrid carries both transactional and marketing mail through one account, which is convenient operationally and the source of the measurement problem: only one of those two streams has anything to do with acquisition. 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 SendGrid send 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
SendGrid campaigns in Matomo: tagging links Matomo will read
Matomo records a SendGrid campaign visit when the landing URL carries campaign or common UTM parameters, so SendGrid's UTM tagging can feed it. Tag marketing sends only, not transactional templates, and confirm click tracking keeps parameters intact. Send orders from your order system through Matomo's Tracking API with the order ID, and ignore SendGrid open counts.
Matomo records a SendGrid campaign visit when the landing URL carries campaign parameters it recognizes. Matomo reads its own campaign parameters and also common UTM parameters, so SendGrid's automatic UTM tagging setting can feed Matomo's campaign reports; confirm with a test send that the values appear as expected on your Matomo version.
The decision that matters is scope. Turn on campaign tagging for SendGrid marketing sends, and not for transactional templates, or tag those with a separate medium you exclude from channel reports. Otherwise customers clicking order confirmations or password resets appear as email campaign visits, and Matomo's goal and ecommerce attribution credits email with orders those customers would have placed anyway. Also check that SendGrid's click-tracking redirect keeps the parameters intact on the final URL.
There is a privacy reason this pair suits some teams. Matomo can track the click and the resulting order on infrastructure you control, so email campaign performance never passes through a third-party analytics vendor. Send orders from your order system through the Tracking API with the order ID so a revisited confirmation page from a receipt link does not record a second order, and ignore SendGrid open counts when comparing campaigns, since mail privacy features inflate them.
SendGrid → Matomo · what breaks
Why this join usually fails — SendGrid → Matomo
- 01
The first-party visitor ID never reaches SendGrid
Marketing clicks land with tracking parameters; transactional clicks generally do not, and both arrive on the same domain.
- 02
Receipt clicks credited to email marketing
A customer clicking through their own order confirmation to check delivery is not an email marketing conversion. Untagged transactional traffic pooled with marketing makes the channel look far better than it is.
- 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.
SendGrid → Matomo · the fix
What working looks like — SendGrid → Matomo
The first-party visitor ID on every message
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
SendGrid → Matomo · architecture
How SendGrid and Matomo actually connect
- 1
SendGrid holds the truth
A receipt and a promotional campaign are both an email in the same account. Only the campaign can plausibly have caused a purchase, and only if the purchase carries the campaign's identifier.
- 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 SendGrid send.
- 4
The event source decides reliability
Send orders with the marketing campaign attributed where a tagged click preceded them.
- 5
Deduplication at the destination
Matomo deduplicates ecommerce orders on order ID. Without one, a refreshed confirmation page records a second order.
SendGrid → Matomo · normal or broken
Working vs. broken, side by side — SendGrid → Matomo
Normal, not a fault
The first-party visitor ID present on the message
Sent from your order system
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
Marketing clicks land with tracking parameters; transactional clicks generally do not, and both arrive on the same domain.
Sent from the browser
A customer clicking through their own order confirmation to check delivery is not an email marketing conversion. Untagged transactional traffic pooled with marketing makes the channel look far better than it is.
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
SendGrid → Matomo · diagnose
Diagnostic order — SendGrid → Matomo
- 01
Count messages carrying the first-party visitor ID
- 02
Follow one real conversion end to end
- 03
Check whether transactional links carry campaign parameters
If they do, every receipt click is being credited to email and the channel's reported performance is inflated.
- 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.
SendGrid → Matomo · prove
How it gets proven — SendGrid → Matomo
Source of truth
Your order system, with marketing sends distinguished from transactional ones.
- The first-party visitor ID confirmed present on a live message.
- Orders reconciled against the Matomo ecommerce log with order-ID deduplication verified.
- Orders from tagged marketing clicks reconciled against imported conversions, with transactional traffic excluded.
SendGrid → Matomo · free audit
What we check in the free audit
- Count messages carrying the first-party visitor ID
- Follow one real conversion end to end
- Check whether transactional links carry campaign parameters
- Check tracker reachability and database lag before debugging any tag
- Read the match rate, not the success message
Checked against
Your order system, with marketing sends distinguished from transactional ones.
Free30 minutesNo obligation
SendGrid → Matomo · when not to buy
When you don't need this — SendGrid → Matomo
- Measure identifier coverage yourself first — pull your last hundred messages and count how many carry the first-party visitor ID.
- If you send only transactional mail, there is no marketing channel here to measure.
- 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.
SendGrid → Matomo · what we deliver
What gets built — SendGrid → Matomo
Identifier capture into SendGrid
Tag marketing links explicitly and attribute purchases from those; treat transactional traffic as returning customers, not as a channel.
Event source: your order system
Send orders with the marketing campaign attributed where a tagged click preceded them.
Dispatch to Matomo
The Matomo HTTP Tracking API, posted server-side from your order system.
Reversals where they exist
Refunds reverse.
Written guarantee
95%+ tracking accuracy
Measured against Your order system, with marketing sends distinguished from transactional ones.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
SendGrid → Matomo questions, answered
Matomo recognizes common UTM campaign parameters as well as its own, so SendGrid's UTM tagging can work. Verify with a test send.
Usually transactional SendGrid emails are tagged as campaigns, so receipt clicks count as email visits. Tag only marketing sends.
Almost always because the first-party visitor ID never reached the SendGrid send. Marketing clicks land with tracking parameters; transactional clicks generally do not, and both arrive on the same domain. 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.
Your order system. Send orders with the marketing campaign attributed where a tagged click preceded them.
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 SendGrid → Matomo
- SendGrid → Google AdsConnecting SendGrid to Google Ads
- SendGrid → MetaConnecting SendGrid to Meta Conversions API
- SendGrid → GA4Connecting SendGrid to GA4
RELATED GUIDES
Where SendGrid → Matomo fits in the rest of your tracking
- Postmark → MatomoConnecting Postmark to Matomo
- Mailgun → MatomoConnecting Mailgun to Matomo
- Resend → MatomoConnecting Resend to Matomo
- SendGrid → AmplitudeConnecting SendGrid to Amplitude
- SendGrid → Adobe AnalyticsConnecting SendGrid to Adobe Analytics
- SaaSConversion tracking for SaaS, from signup through to the payment that matters
Free · 30 min
Get SendGrid and Matomo joined properly
Free30 minutesNo obligation
