Add Rewardful to your website
The final step is to add Rewardful to your website so that we can track visits, leads, and conversions.
These instructions have been prepared for Sticky Speed.
Overview
Stripe lets you package Payment Links as customizable button components that can be embedded directly into your website.
Rewardful integrates with Stripe Buy Buttons by passing the unique referral ID to Stripe
using the client_reference_id
parameter to the stripe-buy-button
element which is then passed to Stripe when the user is redirected to the checkout page.
Step 1: Install JavaScript Snippet
Paste the following JavaScript snippet into the
<head>
tag:
<script>(function(w,r){w._rwq=r;w[r]=w[r]||function(){(w[r].q=w[r].q||[]).push(arguments)}})(window,'rewardful');</script>
<script async src='https://r.wdfl.co/rw.js' data-rewardful='80669a'></script>
Copy
It must appear on every page of your application
and marketing website.
Step 2: Create a Payment Link on Stripe
Stripe Payment Links can be created via the Stripe API or via the dashboard. If you're using the
API, be sure to set the
customer_creation
parameter to
'always'
.
Or if you're creating your link in the dashboard, check the "Save payment details for future user"
option as shown here.
Step 3: Add the Buy Button to your site
When a visitor arrives at your website through an affiliate link, Rewardful creates a unique referral ID
to represent them. By adding a Buy Button to your page with the attribute data-rewardful
,
Rewardful will automatically add the that unique ID to the stripe-buy-button
element
as the client-reference-id
attribute.
<script
async
src="https://js.stripe.com/v3/buy-button.js">
</script>
<stripe-buy-button
data-rewardful
buy-button-id="$BUY_BUTTON_ID"
publishable-key="$STRIPE_PUBLISHABLE_KEY">
</stripe-buy-button>
Copy
Replace
$BUY_BUTTON_ID
and
$STRIPE_PUBLISHABLE_KEY
with the actual values of your Buy Button ID and Stripe Publishable Key respectively.