Squarespace affiliate tracking with Refficks
Stripe Payment Links and Buy Buttons on a Squarespace site.
What it gives you
- Sales through your payment links, Buy Buttons and Pricing Tables are credited to the partner whose link brought the buyer.
- Each payment arrives signed from Stripe, and a refund takes the commission back by itself.
What it does not
- Code injection needs the Core, Plus or Advanced plan (or one of some older plans), and a code block that runs JavaScript needs one of those or a Business or Commerce plan.
- Squarespace Commerce has its own checkout, where no code runs, so its sales are not credited through a payment link. The Squarespace Commerce guide reports them from the order pages instead.
- Only the most recent referral code a visitor arrived with travels to Stripe. If it is nobody's (a link of your own that uses the same parameter, say), the sale is credited to nobody, even when a partner's link brought them earlier.
- Which of a partner's links was clicked, and any sub-IDs, are not recorded on these sales.
- A payment link for a subscription is not credited from the link. Stripe puts the code on the checkout, Refficks counts a subscription's invoices, and the invoices do not carry it. Such a sale is credited only when Refficks knows the buyer another way: they signed up on your site first, or used the partner's discount code.
- A visitor who has not accepted cookies on your site, or whose browser sends Global Privacy Control, carries nothing to Stripe. Their sale can still be credited through the partner's discount code.
- Only links a visitor clicks are carried. A button whose own script sends the visitor to Stripe is not.
Steps
1. Put the Refficks script on every page
In Squarespace, open the Pages panel, choose Custom Code at the bottom, then Code Injection.
Paste the snippet into Header and press Save. On a version 7.0 site, Code Injection is under Website Tools instead.
2. Use your payment links as Stripe gives them to you
Put the buy.stripe.com link on an ordinary link or button, or paste Stripe's Buy Button or Pricing Table embed code unchanged.
Give a button block the buy.stripe.com address as its link.
For Stripe's Buy Button or Pricing Table, add a Code block, set it to HTML, and paste Stripe's code into it.
When a visitor clicks, the script adds the referral code they arrived with as client_reference_id. Stripe hands it back with the payment, and the sale is credited to that partner.
A partner's link can also point straight at a payment link, with no page of yours in between: under Tracking, give the link the buy.stripe.com address as its destination. Refficks adds that partner's code as the visitor is sent on, so the script is not needed for that sale.
A link or embed that already sets client_reference_id is left exactly as you wrote it.
3. Connect Stripe
Payments reach Refficks through your Stripe connection, like every other Stripe sale. If it is not connected yet, connect it on the Stripe page.
4. Make a test purchase
Squarespace may not show your code while you are logged in. Make the test purchase in a private window, logged out.
Open your site through any partner's link, copied from their page under Partners, click a payment link, and pay in Stripe's test mode. The checks on this guide in Refficks turn green as each part is seen. The partner is not credited: a test payment is never counted as a sale.
Sources
Have an account? Open this guide in Refficks for your own script and the checks that show when it is working. New to Refficks? Create an account.