Skip to content

Referral program

With the referral program on, each subscriber has their own share link. Friends who subscribe by it and confirm count towards the rewards you set: a promo code, a download, or something you post to them.

Newsletter › Settings › Referrals:

  • Run the referral program.
  • Share link opens: the page of your site with a signup form, such as your home page. A subscriber’s link is that page with ?ref= and their code: https://example.com/?ref=k7m2qx9a. The signup form embed on any page of your site keeps the code for 30 days, so a signup a few pages later still counts. Your own form passes it as ref to POST /api/v1/newsletter/subscribe.
  • Referral hub page (optional): your site’s page that shows a subscriber their link, count and rewards (see A referral hub on your site).

Put the Referral block in a post or the welcome email (/ in the editor, or Insert). Each reader’s copy has a button to their own link, the link to copy, how many they’ve referred and what’s next. While the program is off it shows nothing.

Or use the merge tags anywhere in a post:

Tag
{{referral_link}} Their share link
{{referral_count}} Their referrals that count
{{next_milestone}} Such as “2 more referrals for A mug”; empty past the last one
{{referral_hub_link}} Your hub page with their token; empty without one

A signup with a code is referred by the code’s owner, if they’re subscribed. It then:

  1. Always confirms by email, whatever your double opt-in setting, so a referral counts only for a real inbox.
  2. Counts once they confirm. Until then it’s waiting to confirm, and one that never confirms never counts.

Only someone new to your list is referred: a subscriber signing up again, or someone who unsubscribed and comes back, isn’t.

These are refused as they come in, with why:

  • The referrer’s own address.
  • A throwaway email service’s address (Mailinator, Guerrilla Mail, 10 Minute Mail and the like).
  • The same network as the referrer’s own signup.
  • More than 3 from one network for the same referrer in a day.

Networks are compared by a keyed hash, never kept as addresses. On Newsletter › Referral program each referral shows its state; Void it stops one counting, and Count it counts one a check refused, once they’ve confirmed. Rewards already given stay.

Add a reward on Newsletter › Referral program: how many referrals earn it, its name and description, and what they get:

Kind
Promo code Paste codes from your store, one per line. Each earner is emailed the next one. When they run out, earners wait in Rewards to send until you add more.
Download link Each earner is emailed the link.
Something to post Each earner is emailed a signed link to give their shipping address. With it, the reward waits in Rewards to send until you Mark sent (with a note, such as the tracking number).

A subscriber earns each reward once, when their count reaches it. Adding a reward, or turning one back on, gives it to everyone already past it. Turn off a reward to stop it being earned; one nobody’s earned can be deleted. Someone who unsubscribed earns nothing new.

Earning a reward emits newsletter.referral_milestone (with contactId, milestoneId and referrals) for automations, and puts it on their timeline. The Leaderboard lists your top referrers, and the Referrals condition of segments takes subscribers by how many referrals of theirs count.

Your site can show a subscriber their own referral page. {{referral_hub_link}} in a post or the welcome email opens your hub page with ?rt= and a token that names them. The page passes it to GET /api/v1/newsletter/referrals/mine with your publishable key:

const token = new URLSearchParams(location.search).get("rt");
const response = await fetch(
`https://digize.com/api/v1/newsletter/referrals/mine?token=${encodeURIComponent(token)}`,
{ headers: { "x-api-key": "dgz_pk_…" } },
);
const me = await response.json();
// me.link, me.count, me.pending, me.next, me.milestones, me.rewards

rewards has each one they earned: its promo code, the downloadUrl, or an addressUrl while a physical one waits for their address. The token works for a year; newer emails carry fresh ones.