RekomiRekomiBlogPricing
Rekomi Docs
Rekomi Docs
Welcome to Rekomi
Quickstart for brandsPlans and trialsIntegrationsStripe Connect (sales tracking)Organization settingsTeam managementNotifications
Install tracking

Payment platforms

Install on StripeStripe Marketplace appInstall on PaddleInstall on BraintreeInstall on ShopifyInstall on Lemon SqueezyInstall on ChargebeeInstall on PolarInstall on RecurlyInstall on GumroadInstall on CreemInstall on Dodo PaymentsS2S API (any gateway)

Membership and course platforms

Install on MemberstackInstall on OutsetaInstall on PodiaInstall on TeachableInstall on Thinkific

Newsletter and creator platforms

Install on GhostInstall on beehiivInstall on Kit (ConvertKit)

Site builders

Install on WordPressInstall on WebflowInstall on FramerInstall on SquarespaceInstall on WixInstall on BubbleInstall on Carrd

Frameworks

Install on Vanilla JavaScriptInstall on Next.js App RouterInstall on Next.js Pages RouterInstall on React (Vite, CRA, Remix)Install on VueInstall on RailsInstall on Django

Campaigns and commissions

CampaignsCommission modelsPay per click or lead (CPC & CPL)Coupon-code attributionSub-affiliate recruitingTracking and attribution

Affiliates

Recruit affiliatesManage affiliatesAI co-pilotApply to the curated network

Money flow

SalesPayoutsMulti-currencyTax formsReports

Email

Sending domainBroadcasts
For brandsInstall tracking
|Brands|

Install on Ghost

Ghost Members + Stripe Connect handles the conversion fire automatically. The head script in Code Injection captures the click. Optional Handlebars block fires a backup convert on the /portal/ redirect.

Ghost logo

Ghost Members uses Stripe Connect for paid memberships, which means Rekomi attribution flows through the same Stripe webhook rail as a native Stripe customer. The install is the simplest of the no-code platforms: paste the head script in Ghost's Code Injection, and the rest works automatically. The only extra wrinkle is distinguishing free signups (Ghost fires member.signupAdded, no Stripe involvement, no commission) from paid upgrades (Ghost fires member.subscriptionAdded and Stripe fires customer.subscription.created).

Install the head script

Step 1. In Ghost admin, navigate to Settings > Code injection > Site Header.

Step 2. Paste the Rekomi head script:

<script>
  (function(){
    var s=document.createElement('script');
    s.src='https://js.rekomi.com/v1/rekomi.js';
    s.async=true;
    s.dataset.programId='YOUR_PROGRAM_ID';
    document.head.appendChild(s);
  })();
</script>

Save. The script loads on every public Ghost page (posts, pages, members portal entry). Code Injection is theme-agnostic, so it survives theme updates.

Your program ID is in Rekomi at Settings > Tracking. The install works identically on Ghost Pro and self-hosted Ghost.

How attribution works (the standard path)

Ghost Members is Stripe-Connect-backed. When a visitor signs up for a paid tier, Ghost creates a Stripe Customer and subscription; Stripe fires customer.subscription.created and invoice.payment_succeeded to Rekomi's webhook listener. Rekomi reads the affiliate cookie that was set when the visitor first landed on a Ghost page (via the head script) and credits the commission.

No extra conversion-page snippet is required for this flow. The head script captures the click; Stripe closes the loop.

Optional: backup convert event on /portal/

If you want a backup attribution path (e.g., for Ghost free-tier setups using a third-party paywall, or for redundancy when your Stripe webhook listener has downtime), add a Handlebars block to the theme's default.hbs that fires the convert event when the member portal redirects post-signup.

Edit default.hbs in your theme:

{{#if @member}}
  {{#if (startsWith request.path "/portal/account")}}
    <script>
      window.Rekomi && window.Rekomi.convert({
        external_event_id: '{{@member.uuid}}',
        amount_cents: 4900, // hard-coded per tier; adjust to your pricing
        currency: 'USD',
        customer_email: '{{@member.email}}',
      });
    </script>
  {{/if}}
{{/if}}

The startsWith helper keys the convert event off the paid-portal navigation only, so it fires on paid signups (Ghost redirects them to /portal/account/ after Stripe completes) and not on free signups (which redirect elsewhere).

This is OPTIONAL. The Stripe webhook is canonical; this backup is for redundancy or non-Stripe billing modes.

Free vs paid distinction

Ghost fires different events depending on signup type:

  • member.signupAdded for free-tier signups. No Stripe involvement, no commission. The convert backup snippet above is gated to NOT fire on this event (the portal redirect goes to a different path).
  • member.subscriptionAdded for paid signups. Stripe fires the canonical webhook; Rekomi credits the commission.

If you want to track free-tier signups (e.g., for lead-magnet style affiliate programs where the commission is on the email capture, not the paid upgrade), use the Ghost Admin API to listen for member.signupAdded and fire an S2S call to Rekomi from your backend. This is non-standard; most affiliate programs only commission on paid.

Quirks worth knowing

Members API has rate limits. If you are syncing members programmatically via Ghost Admin API (e.g., to track free signups), Ghost throttles bursts aggressively. Use Stripe webhooks as the canonical conversion source; treat Ghost Admin API as enrichment, not the source of truth.

Hard-coded amount in the Handlebars backup. Ghost's Handlebars context for default.hbs does NOT expose subscription price. The amount_cents in the optional backup snippet is hard-coded. If you have multiple paid tiers, the snippet either uses the highest tier (conservative; over-credits) or you render the snippet server-side from your Ghost webhook handler with the actual tier price.

/portal/ is the Members portal subpath. The portal lives at /portal/ on your Ghost domain. The redirect after a paid signup goes to /portal/account/. The startsWith check in the backup snippet keys off this URL pattern; if Ghost ever changes the redirect path, update the check.

Theme updates and Code Injection. Ghost's Code Injection > Site Header is independent of theme files. Switching themes preserves the head install. The optional Handlebars backup, however, lives in default.hbs and is per-theme; theme switches require re-adding it.

Self-hosted Ghost is identical. The same Code Injection field exists on self-hosted Ghost. No differences in install behavior between Ghost Pro and self-hosted.

Refunds

Stripe Connect fires charge.refunded and customer.subscription.deleted on cancellations. Rekomi reverses the commission and updates the affiliate's pending balance automatically. No Ghost-side configuration needed.

If you are on a non-Stripe billing mode (rare for Ghost), refund attribution requires forwarding Ghost's member cancellation webhook to /api/tracking/refund with the matching external_event_id from the original conversion.

Troubleshooting

Visitor signs up for paid, no conversion lands in Rekomi. Confirm the Stripe webhook in Rekomi (Settings > Tracking > Stripe webhook) points at the right Stripe account and is enabled. Verify a recent test signup shows up in Stripe's webhook deliveries dashboard.

Visitor signs up for free, no conversion lands. Expected. Free signups do not generate Stripe events and are not commissioned by default. If you want to commission free signups, see "Free vs paid distinction" above.

Affiliate cookie missing on the Ghost member portal. The portal opens in a modal or new window in some Ghost themes; the cookie should still be present because it was set on the same domain. If you customized the portal to load via iframe from a different subdomain, the cookie effective domain has to include both.

Refund did not clawback. Confirm your Stripe webhook listener receives charge.refunded (check Stripe's webhook deliveries dashboard). If yes, the issue is on the Rekomi side; check the activity log for the corresponding entry.

Related

  • JavaScript pixel reference
  • Tracking and attribution overview
  • Ghost docs: Members and subscriptions

Install on Thinkific

Use Thinkific's Site Footer Code (not Header) so the head script runs on the Course Player. Conversion fires on the Order Confirmation page via a Liquid block.

Install on beehiiv

beehiiv blocks per-post script tags and offers no arbitrary head HTML field, so Rekomi installs via Google Tag Manager. Premium Subscriptions then attribute through beehiiv's Stripe Connect webhook.

On this page

Install the head scriptHow attribution works (the standard path)Optional: backup convert event on /portal/Free vs paid distinctionQuirks worth knowingRefundsTroubleshootingRelated