Squarespace

Tracking incoming referrals on your SquareSpace powered website is pretty easy and straightforward with ReferralMagic. The steps you need to follow are;

  1. Create your ReferralMagic account (if you haven't done already)
  2. Create your referral campaign
  3. Copy tracker javascript
  4. Add tracker script to your Squarespace website pages
  5. Test

Step 1: Create ReferralMagic account

If you haven't created your ReferralMagic account yet, please visit https://dashboard.referralmagic.co/register and signup for a trial account. After signing up (or logging in if you have an existing ReferralMagic account), create your referral campaign.

Step 2: Create your referral campaign

Give a name to your campaign, enter your website URL where your referrals will visit, choose "Signup Booster" referral campaign type and enter your reward settings.

Step 3: Copy tracker javascript

Once your campaign is created, you will be redirected to the installation instructions page. Copy the tracker javasript as shown below:

Step 4: Add tracker script to your Squarespace website

Login to your Squarespace dashboard and edit your website pages. Edit the page content block:

Scroll down to the bottom of the page content and click "Add Block" icon. From the menu, choose "Code":

On the opened window, choose "HTML" mode from the drop list:

Before pasting tracker javascript code copied from your ReferralMagic account, on the first line, add the following javascript code:

<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>

Then paste the tracker javascript code you have copied from your ReferralMagic account. Then copy&paste the following javascript code:

<script>
	$.noConflict();
	var rfmgc_isSubmittingSignUp = false;
	function rfmgc_handleFormSubmit(e) {
		if (rfmgc_isSubmittingSignUp) { return; }
		rfmgc_isSubmittingSignUp = true;
		var form = jQuery(this).parents('form');
		var email = jQuery('input[name=email]', form).val();

		if (email!='') {
			window.rfmgc('sign-up', {
				email: email
			});
		}
	}

	jQuery(function() {
		jQuery('input[type="submit"]').on('click', rfmgc_handleFormSubmit);
      jQuery('button[type="submit"]').on('click', rfmgc_handleFormSubmit);
		jQuery('input').on('keydown', function(e) {
			if (e.which === 13) { rfmgc_handleFormSubmit(e) }
		})
	});
</script>

Click "Apply" button and save your page content.

ReferralMagic will start tracking form submissions and visits on your Squarespace powered website.

For any questions or comments, don't hesitate to contact us anytime.

Still need help? Contact Us Contact Us