How do I Integrate my campaign on my website?

xNow that you've created your first referral campaign it's time to integrate that campaign into your website.  This typically covers 3 real areas that we'll cover in this guide:

  • SalesCamp tracking Snippet
  • Stripe Integration
  • Referrer Signup

Let's tackle each of these in order.

Installing the SalesCamp Tracking Snippet

In your campaign dashboard once you've created your campaign you'll be taken to a "Code Snippets".  Here there are several options of ways (and places) to integrate SalesCamp into your website.  Only one of these is required for any/all campaigns: the Tracking Snippet.  

In the Code Snippets area of your SalesCamp dashboard the first tab will show this:

This one line of code is the real magic of the referral campaign and the piece that attributes back visitors to your site to the Referrer (and their Referral Link) that sent them there.

<script src='//' async='async'></script>

This snippet should go on EVERY page of your website. This is normally most easily done through installing this snippet into a template file or one that gets loaded every time your page loads.

A note on subdomains: Many of our customers are SaaS applications and (like SalesCamp) separate our their main/marketing site form their web application where the latter is on a subdomain. We've taken account for this and use a wildcard cookie setup so that your cookies are applied globally across all of the domains.  So, if someone lands on and then makes a purchase on you're covered.

Stripe Integration

To incorporate your referral program into your Stripe account we need to send a single piece of information along to Stripe whenever you create a new Customer there.  This is the code snippet in the Stripe Integration tab of your Code Snippets section.

metadata: { salescamp: request.cookies['salescamp']}

This will send the unique identifier of the Referrer (the person who sent this new customer to your site) and is the piece that ties back the attribution of this new sale with the Reward creation process for the Referrer.

Note: The `metadata` key and value should be passed into the Subscription area in Stripe for recurring subscriptions, and into the Charge area of a transaction for one-off events.

This metadata should be sent to along with the other customer information you're likely already sending in an array to Stripe. These are likely things like Name, Last 4 Digits of Card, Card Type, Subscription Plan or Purchase Amount, etc. 

Referrer Signup

We're big on choices here at SalesCamp and we give you a few ways to let new Referrers sign up for your referral programs.  But the easiest way is with our prebuilt Referrer Signup Pages.  

These are customized with the Name of your referral campaign, and let new Referrers sign up for your campaign with just their email address and a password of their choosing.

From there your new Referrers will be able to see their unique Referral LInk, any pending and fulfilled rewards, as well as chances to share your site with their networks via templated emails, Facebook, and Twitter posts.  

Most often we see our customers using a link to this hosted page from their own website, emails, and social media posts.  You can also create an Affiliates or Partners page on your site with more information about your referral program, and link to this signup page from there directly.