Clickfunnels is one of the leading landing page builder service around the world. You can easily integrate ReferralMagic to your Clickfunnels powered landing pages and start tracking incoming referrals easily. This article will explain step by step instructions to integrate your ReferralMagic and Clickfunnels accounts.

Step 1: Add tracker javascript to your Clickfunnels website pages

Login to your ReferralMagic account and create your referral campaign if you haven't done yet. On the next step, you will see the installation instructions page. Copy the tracker javascript code:

https://d33v4339jhl8k0.cloudfront.net/docs/assets/58bea548dd8c8e56bfa83e96/images/5abb5a6a042863794fbeafa6/file-syYI14OsZy.png

Login to your Clickfunnels account and click "Clickfunnels" link on the top menu and then click "Browse Funnels" option:

https://d33v4339jhl8k0.cloudfront.net/docs/assets/58bea548dd8c8e56bfa83e96/images/5af188e60428631126f1ce04/file-dUtMDew8yO.png

Edit your funnel and on each funnel step. Choose the funnel step on the left side (1), then click "Edit Page" button (2):

https://d33v4339jhl8k0.cloudfront.net/docs/assets/58bea548dd8c8e56bfa83e96/images/5af18a190428631126f1ce17/file-Dw3l9F03ml.png

Add "Javascript" content block to any place on your page:

Repeat this process for every funnel step.

On the lead form funnel step, edit your page and add the following additional Javascript code which will capture the entered email address and trigger the conversion tracking on your ReferralMagic account:

<script>
	var rfmgc_isSubmittingSignUp = false;
	function rfmgc_handleFormSubmit(e) {
		if (rfmgc_isSubmittingSignUp) { return; }
		rfmgc_isSubmittingSignUp = true;
		var email = $('input#cf_contact_email').val();

		if (email!='') {
			window.rfmgc('sign-up', {
				email: email
			});
		}
	}
	jQuery(function() {
      	jQuery('form#cfAR').on('submit', rfmgc_handleFormSubmit);
		jQuery('input').on('keydown', function(e) {
			if (e.which === 13) { rfmgc_handleFormSubmit(e) }
		})
	});
</script><br>

Step 2: Add refer-to-friend widget

The last step is to add refer-to-friend widget so that your users can copy the invitation link and share it across their circles. The refer-to-friend widget javascript code must be added to the result page where you a unique identifier about your visitor (such as email address).

Login to your ReferralMagic account and go to your referral campaign dashboard. On the right menu, you will see "Widget Setup" menu item. Click on it:

https://d33v4339jhl8k0.cloudfront.net/docs/assets/58bea548dd8c8e56bfa83e96/images/5abb5be5042863794fbeafae/file-SLUaw4mixW.png

Scroll down on the page and copy the widget code and place it to the target page where you have unique identifier about your visitor (example: email address). If you don't have a unique identifier about your visitor, you can simply use the email address which has been gathered on step 1 javascript code.

https://d33v4339jhl8k0.cloudfront.net/docs/assets/58bea548dd8c8e56bfa83e96/images/5abb5c392c7d3a0e9366ce5c/file-wLCTe4EgxF.png

That's all. You have successfully added referral tracking system and invite friend widget to your Clickfunnels powered landing page.

If you need help, feel free to contact us anytime. We will be happy to assist you for Clickfunnels integration.