WordPress affiliate tracking with Refficks
Stripe Payment Links and Buy Buttons on a WordPress site, with the Refficks plugin putting the script on every page.
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
- The plugin is downloaded from Refficks for now and does not update itself. When a new version comes out, download it again and upload it in the same place: WordPress offers to replace the one installed. It will move to WordPress.org's plugin directory, which updates it for you.
- This is for WordPress you host yourself. On WordPress.com, uploading a plugin needs a plan that allows plugins.
- 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. Install the Refficks plugin and connect it
Download the plugin below. In WordPress, open Plugins › Add New Plugin, press Upload Plugin, choose the file and press Install Now, then Activate Plugin.
Open Settings › Refficks and press Connect to Refficks. Refficks opens and asks you to approve the site; approve it. The plugin then puts the script on every page and tells Refficks who signs up or logs in.
Selling with WooCommerce? Follow the WooCommerce guide instead: it is the same plugin, and it sends your orders too.
Download the plugin (.zip)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.
Add a Buttons block and give the button the buy.stripe.com address as its link.
For Stripe's Buy Button or Pricing Table, add a Custom HTML block and paste Stripe's code into it. WordPress lets only administrators and editors save code like this.
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
The plugin puts the script on the pages your visitors see, not in the editor. Test on your site's own address, 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.