Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.datalyr.com/llms.txt

Use this file to discover all available pages before exploring further.

For Stripe SaaS spending $10K+/mo on paid. Meta optimizes for trial signups, but you make money on MRR. DATALYR connects every ad click to the paid subscription it produced, including the rebill three months later, with one line in Stripe and no rip-and-replace.

+2.6x

Meta-reported ROAS

-38%

Lower cost per paid sub

10 min

Install to live

97%

Paid subs linked to an ad

The Problem

Meta scales whatever you tell it. Trial signups are not revenue. Most SaaS optimize Meta on trial_started or signup_completed because that is all Stripe sends back fast enough. Meta floods you with trial-takers who never convert. The paid subscription happens 7-14 days later, on a different device, from a different IP. Meta never connects it back. CAC creeps up and churn-adjusted LTV tanks.
Ad click  →  Trial signup  →  ...7-14 days...  →  Paid  →  Rebills
             (Meta sees this)                     (Meta never sees these)

The Mechanism: Identity Bridge

Pass the DATALYR visitor ID into Stripe Checkout’s client_reference_id. Every payment, every rebill, every upgrade goes server-side back to Meta with the original ad attached. No client-side tracking, no email-matching gymnastics.
01  Ad click          We tag the click
        │  minutes later, signup
02  Stripe Checkout   Checkout carries the click
        │  7-30 days later, trial to paid
03  Payment made      Server-side back to the ad platform

Payload: click · customer · location · plan value · MRR
Destinations: Meta Ads · Google Ads · TikTok Ads
See How Attribution Works and Identity Calls for the underlying logic.

What You Get

Trial to paid attribution

The paid conversion 14 days later still credits the ad. No more flying blind through the trial window.

Every rebill counted

Month 6, month 12, the upgrade to annual, all attributed back to the original ad. Meta bids on LTV.

Stripe Connect native

OAuth in once, no webhook signing secrets. Works with Checkout, PaymentIntents, Subscriptions, and the Billing Portal.

Refunds and cancellations

Voluntary churn and refunds roll back automatically. Meta and Google stop over-crediting bad subs.

B2B lead-to-revenue

Identify users in your CRM with the visitor ID. The MQL to SQL to closed-won chain becomes one event stream.

Live signal monitoring

See which events are forwarding and which are not, by ad platform and by campaign, in real time.

Before / After

Illustrative example: a B2C SaaS at $20K/mo Meta spend, 30 days post-install.
MetricBefore (optimized on trial_started)After (DATALYR Identity Bridge)
Reported Meta ROAS1.1x2.8x
Cost per paid subscription$94$58
Trial-to-paid conversion rate8%19%
Rebills credited to original adNoYes
Meta optimization signaltrial_startedpayment_succeeded

DATALYR vs the Rest

Most attribution tools show you charts. DATALYR fixes the signal feeding Meta.
CapabilityDATALYRTypical attribution tool
Stripe client_reference_id wiringYesPartial
Rebills attributed to original adYesNo
Trial-to-paid window stitching (7-30d)YesPartial
Server-side Meta, Google, TikTok forwardingYesPartial
Refunds and cancellations handledYesNo
No rip-and-replace of existing Stripe codeYesNo
Web and mobile in one workspaceYesNo

How to Set It Up

1

Drop in the web SDK

One script tag on your marketing site and app auto-captures fbclid, gclid, ttclid, and UTMs at first touch.See the web SDK.
2

Connect Stripe

Stripe Connect OAuth in one click. No webhook signing secrets to paste, DATALYR handles it.See the Stripe integration and Stripe webhook attribution.
3

Pass the visitor ID into Stripe

One line in your Checkout Session creation. For subscriptions, drop datalyr_id into metadata.
const session = await stripe.checkout.sessions.create({
  // ...your existing config
  client_reference_id: datalyr.getVisitorId(),
});
4

Optimize on payment_succeeded

Switch your Meta optimization off trial_started and onto payment_succeeded. Meta finally bids for buyers, not browsers.See Conversion Rules.
Running a sales-led B2B motion? The visitor ID flows through to Salesforce or HubSpot via identify(), so MQL to SQL to closed-won attributes back to the original ad even months later. See Identity Calls.

Example Scenario

A B2C SaaS at $20K/mo on Meta, optimizing on trial_started because that is what Stripe sent fast enough. After DATALYR, every paid subscription and every rebill phoned home to its ad, so Meta stopped scaling trial-takers and started scaling buyers.

2.6x

ROAS lift

-38%

Lower CAC

1 month

To full payback

Frequently Asked Questions

Do I have to change my Stripe integration?

One line. Pass client_reference_id: datalyr.getVisitorId() into your Checkout Session, or datalyr_id into metadata for PaymentIntents and Subscriptions. That is it.

Does this work for B2B SaaS with sales-led motions?

Yes. The visitor ID flows through to Salesforce or HubSpot via identify(). MQL to SQL to closed-won attributes back to the original ad, even months later.

What if my trial-to-paid window is 30 days?

No problem. The Identity Bridge holds the click context indefinitely. Day 30 conversions credit the original ad just like day 1.

Will this work with my existing Meta Pixel?

Yes. DATALYR runs alongside whatever you have. Turn off Pixel Purchase events for what DATALYR forwards to avoid double-counting.

What about subscription upgrades and downgrades?

Every plan change fires its own attributed event. The upgrade from Pro to Team six months later still credits the original ad click.

How long does install take?

About 10 minutes: web SDK script tag, Stripe Connect OAuth, and one line in your Checkout creation.

Does it support Stripe Checkout, PaymentIntents, and Subscriptions?

All three, plus Billing Portal upgrades. DATALYR reads both client_reference_id and metadata.datalyr_id automatically.

What does it cost?

Plans scale with your event volume. See pricing for current tiers.

Is my customer data safe?

Yes. Your data is yours, never sold and never used to train models. EU data residency is available.

Next Steps

Get Started

Start your 7-day trial, no credit card required.

Stripe Integration

Connect Stripe and sync subscription revenue.

Conversion Rules

Map payment_succeeded to Meta, Google, and TikTok.

Web SDK

Capture click IDs and the visitor ID at first touch.