Link Search Menu Expand Document

Capturing a referral code in Shopify

If you are using Spaaza to run a referral program with Shopify then you will need to capture a referral during the account creation process.

During the referral process, a referred person usually receives either a referral URL and/or a referral code. These may be received in an email, message or via social media. A referral code could also be communicated verbally or through some sort of identifier (for example a staff member’s badge).

An example of a referral code on the Shopify Account Creation page

The screenshot above shows an example signup form in Shopify with a referral code. Referred users could enter this referral code directly into the signup form. This would then be used by Spaaza to connect this person to their referrer and to issue any rewards.

The screenshot also shows a referral code parameter, “ref=123abc”, in the URL of the page. This is the URL that was shared by the referring user in this case. When the referral URL is used the Referral Code form field should be automatically populated with the referral code. To do this the signup web page needs to have some logic, most likely using javascript, to “pull out” this parameter value and set the Referral Code form value field to this value.

When the signup form is submitted the referral code should be added as a tag to the Shopify customer in the following format:

tag: spaaza_referral_code:[referral_code_goes_here]