Campaign-Only Codes for Email and Creators

A campaign discount code that works only from one tagged link: when to use it for email or creators, where it leaks and how to read the result.

A campaign discount code answers a narrow question: how do I give one audience a discount without giving it to everyone who finds the code? A newsletter list, a creator's followers or a partner's customers each get the offer through one link, and the code works from that link and nowhere else. This page explains where that fits among the other kinds of code, what Shopify's own shareable links already do, how to tag links so the results can be read, where codes still leak, and how to read a single campaign without fooling yourself.

Three kinds of code, one line each

  • A public code is one string anyone can type. It is simple and it spreads wherever codes are posted.
  • A per-recipient code is one string per person, usually single use. It is the tightest control and the most work; unique discount codes on Shopify covers how.
  • A campaign-only code is one string for one campaign, tied to the link that campaign uses. It sits between the two: one code to manage, with the audience set by where the link goes.

Which one is right depends on what a leak costs. For a ten percent welcome offer a public code is fine. For a creator's followers where you want to know who sent the orders, tie the code to the creator's link.

What the template does

Freebies Engine by Log Studio Lab has a Campaign code template. The template index describes it in one line, "A code that only works from a tagged link," with the example "Works only from your newsletter link." That is all this page claims about how it behaves; open the template to see the exact settings, and read the plan requirement that the call-to-action at the end prints. If you want a code that works everywhere, the Single code template is the simpler tool.

Shopify's own discount tools include links, and knowing what they do tells you what a link can and cannot protect. The Help Center page on managing discounts says that you can choose Promote and then get a shareable link or a QR code, that the link or code can have only a single discount applied to it, and that shareable links and QR codes work only for active discounts. It also says the discount "applies automatically to your customer's next checkout cart," and that the discount is saved to the customer's cart and to their browser, so it stays applied until it is removed, and opening the link again reapplies it.

Three consequences follow.

  • Whoever has the link gets the discount. A link forwarded to a friend works the same way for the friend.
  • The discount sticks. Because it is saved in the browser, a shopper who clicked the link last week and returns today may still have it.
  • A link can send the shopper somewhere. The same page says you can change the link's extension to add a redirect to another page, so the link can land on the collection that matches the campaign.

The page also says that when you attach a marketing campaign to a shareable link, the campaign's UTM identifier and source are added to the link automatically, which is what connects the discount to the campaign reports.

Reports can only group by what you put on the link. Shopify's page on understanding campaigns defines the parameters: utm_source identifies the source of the traffic, such as a social platform or a newsletter; utm_medium identifies the channel the link was clicked from, such as email; utm_campaign names the specific campaign; utm_term tracks paid keywords; and utm_content differentiates creative elements within a campaign. The page's matching example uses two of them together, a campaign matches a session when utm_campaign and utm_source both fit the rule, and says that extra parameters on the session are ignored.

The convention below is ours, not Shopify's, but it follows those definitions:

ParameterNewsletterCreator
utm_sourcenewsletterthe creator's handle in lower case
utm_mediumemailsocial
utm_campaignone name per send, with the monthone name per creator brief, with the month
utm_contentthe link's position, such as header or footerthe post type, such as story or video

Write the names in lower case with hyphens, once, in a shared sheet. A report that shows "Newsletter," "newsletter" and "email-newsletter" as three sources is a report nobody can use.

Where a code still leaks

A link-only rule closes one leak, the bare code typed in from a coupon page. Others stay open:

  • The link itself, forwarded or posted. The link carries the discount, as above.
  • A creator who reposts. A creator can share a link beyond the audience you briefed. Set the usage limit with that in mind.
  • A screenshot of the cart. Not a technical leak, but it spreads the offer.
  • Stacked offers. The page on discount codes lets you set whether the code combines with other discount classes; decide that before the send, not after.

Shopify's discount code page lists the limits you can set: the number of times a code can be used, a start and end date in the store's time zone and a minimum order amount, and it notes that a once-per-customer limit applies only to that specific discount. A campaign code should always have an end date and a total use limit sized from stock and margin. The limits cap the cost when a link leaks, and the link rule limits how many people see it.

Reading one campaign

Shopify's marketing reports show how much of your traffic and sales can be tied to a campaign. The Marketing reports page says that the "Performance by marketing campaign" report leaves out traffic that is not associated with a campaign, that "Sales attributed to marketing" covers sales from traffic that can be directly attributed to marketing, and that these sales "can differ from sales figures in other reports." The page also says its reports include canceled, pending and unpaid orders, and that the channel report uses the last non-direct click model by default. A session ends after 30 minutes of inactivity.

The reading rule is simple. Attributed orders are the orders that came through the link. They are not the orders the campaign created. A subscriber who was about to buy anyway uses the link and the code, and the report counts the order.

A worked example with invented numbers: an email to a list sends a campaign code worth 10 percent off. The report attributes 54 orders to the campaign. The average order before discount is 70 dollars, the margin before discount is 45 percent, which is 31.50 dollars an order, and the code takes 7.00 dollars off, leaving 24.50. The campaign's contribution is 54 times 24.50, or 1,323 dollars. In a matched earlier send to the same list without the code, 31 orders came in, and 31 times 31.50 is 976.50 dollars. The net is 1,323 minus 976.50, or 346.50 dollars, and the incremental orders are 54 minus 31, or 23, not 54. If the earlier send had produced 54 orders, the code would have given away 378 dollars of discount for nothing.

Shopify's signals disagree with each other in predictable ways, which promotion attribution lays out. How to pick the matched send, and when to use a holdout instead, is in how to measure whether a promotion worked and incrementality for small stores.

Building a campaign code

Start from the Campaign code template. Choose the audience and the link it will live on, set a total use limit and an end date, and tag the link with the pattern above. If the campaign is free shipping rather than a discount, Free Shipping Only From a Landing Page covers the landing-page version. Then send yourself the email, open it on a phone, click through and place a test order, and open the same link from a second browser to see that the discount applies as you expect. The call-to-action below prints the plan requirement for the template.

Sources

Build this offer from the “Campaign code” template.

Requires: Pro plan or higher.