Ghost integration

Lead source tracking for Ghost.

See where every Ghost signup and contact form lead actually came from.

Works with free, paid, and Comp member signups No theme code edits, no Members API integration Live in minutes

Works across Ghost signup flows

Free member signups Paid subscriptions Comp signups Contact forms Portal popup Custom signup forms
The gap

Ghost tracks members. Where they came from is not the focus.

Ghost is built for publishers. Content, subscribers, monetization. The Members system tracks who signed up, when, and which tier. Source attribution beyond the basic referrer header isn’t part of the native data model.

What Ghost captures natively

The member, the tier, the payment

  • Member email, name, tier
  • Free, paid, Comp signup types
  • Stripe-integrated subscription state
  • Newsletter open and click tracking
  • Members API for custom integrations
What’s thin in the attribution model

Marketing source data

  • No source field on Members
  • No UTM capture in signup flow
  • No page journey before subscription
  • No campaign attribution per member
  • Referrer-based tracking only (and limited)
The usual workaround

Members API. Custom theme code. A monthly export.

The Ghost path to subscription-source attribution involves modifying your theme’s signup flow, hooking the Members API to capture metadata on signup, storing source values somewhere queryable, and reconciling against ad-platform data manually.

The manual way

  • 01
    Customize your Ghost theme’s signup forms or Portal popup to include hidden inputs for UTM parameters. (Portal is Ghost’s native signup widget. Limited customization.)
  • 02
    Build a small JavaScript layer that reads URL parameters on page view, persists them in localStorage or cookies, and reads them at signup submission.
  • 03
    Hook the Members API or webhooks to capture submission metadata into a custom field. Maintain that integration through Ghost upgrades.
  • 04
    Export member data monthly. Reconcile signup spikes against ad spend. Update your “true source” tracking spreadsheet manually.

With Lead Source

  • 01
    Paste one script tag into Settings → Code Injection → Site Header. Once.
  • 02
    We detect Ghost Portal signups and custom signup form submissions automatically. Free, paid, and Comp tiers all captured.
  • 03
    Source recorded with the campaign name written out: “Twitter Ads · Substack Migration Q1”. Per signup, with cross-page UTM persistence.
  • 04
    Your Ghost theme stays exactly as it is. No Portal customization. No Members API integration to maintain.

// Ghost is for publishing. Lead Source is for understanding which content acquires which subscribers.

What you install

One script tag. That’s the whole thing.

Sign up, copy the snippet from your dashboard, paste it into Ghost’s Code Injection → Site Header. We detect Ghost Portal signups automatically. The block below shows what the snippet looks like. Your real one will have your unique site ID baked in.

example only. Your real code is in the dashboard
<!-- illustrative. Paste your real snippet from app.leadsource.co -->
<script src="https://leadsource.co/s/[your-site-id].js" async></script>

The real snippet is generated for your account when you sign up. Copy it from the install page in your dashboard. Under 50ms execution. Async, so it doesn’t block your page. No dependencies.

Install on Ghost

Three steps. Most sites are done in five minutes.

1

Sign up. Get your script tag

Create your free Lead Source account. You’ll see a snippet on the dashboard with your unique site ID already in it. Copy it.

No credit card required to start. The signup flow takes about a minute.
2

Paste it into Ghost Code Injection

In Ghost Admin, go to Settings → Code Injection. Paste the snippet into the Site Header box. Save. The script loads on every page automatically. No per-page configuration needed.

Code Injection is available on every Ghost plan, including self-hosted. Works identically on Ghost Pro, Ghost self-hosted, and Ghost on third-party hosts.
3

Submit a test signup

Open your site. Trigger the Portal popup (or use a custom signup form). Sign up with a test email. Within a minute or two, the signup appears in your Lead Source dashboard with source, campaign, and page journey attached.

Want to test attribution end-to-end? Add ?utm_source=test to the URL before you submit. That’ll be the source on the lead.
Common questions

Questions, answered.

Does it work with Ghost Portal (the native signup popup)?

Yes. Ghost Portal is the default signup widget. Lightbox-style popup with email entry for free and paid signups. Lead Source detects Portal signups automatically without any Portal customization.

Does it work with custom signup forms in my theme?

Yes. If you've built a custom signup form in your Ghost theme (replacing or augmenting Portal), Lead Source detects the submission event the same way. No theme-specific configuration needed.

Will it work on Ghost Pro and self-hosted Ghost?

Yes, identically on both. Code Injection is available on every Ghost plan including the lowest Ghost Pro tier and on self-hosted installations. The install path is the same.

Does it capture source for paid subscriptions vs free signups?

Both. Lead Source captures source at the moment of signup. The signup may be free (Free tier), paid (Stripe-integrated subscription), or Comp (admin-issued complimentary access). We attach source regardless of which tier.

What about the Stripe checkout step in paid signups?

We capture source at the initial signup step (when the visitor enters their email and selects a tier), not at Stripe checkout completion. This is the right capture point. Source data lives with the member from sign-up, regardless of whether the Stripe payment succeeds or is abandoned. If the Stripe step fails, you still know which campaign brought a free-tier user (and which campaigns are converting to paid attempts vs successful payments).

Track your Ghost signups. Free to start.

One script in Code Injection. Every Ghost Portal signup, every member subscription. Source, campaign, page journey without touching theme code or the Members API.

Start free

Free to start &middot; no card