HubSpot forms affiliate tracking with Refficks
HubSpot forms on your site, tied to the partner whose link brought the person, so their later payment is credited to that partner.
What it gives you
- Somebody who arrives through a partner's link and then sends the form is tied to that partner. When they later pay, through any payment connection Refficks receives, the sale is credited to the partner who sent them.
- The email never appears in an address: HubSpot tells your page directly.
What it does not
- A form on its own pays nobody: it is recorded as a lead, never as a new account, so it does not qualify a referral reward that waits for an account. A partner is paid when that person pays, and the payment has to reach Refficks from a connection that names the same email.
- A visitor who has not accepted cookies, or whose browser sends Global Privacy Control, is not named.
- Only forms embedded on your own pages. A form on a HubSpot-hosted landing page runs where the Refficks script is not.
- The form has to use HubSpot's own email field.
Steps
1. Put the Refficks script on every page
Paste the snippet into the head of every page of your site, including the pages with HubSpot forms.
2. Name the person when they send the form
Paste the code below on each page with a HubSpot form, after the Refficks script and before HubSpot's embed code. It works with forms from both HubSpot's legacy and new form editors, and passes the form's email field to Refficks when the form is sent.
<script> (function () { function say(email) { if (typeof email === "string" && email && window.refficks) window.refficks.lead({ email: email }); } window.addEventListener("message", function (event) { var data = event.data; if (!data || data.type !== "hsFormCallback" || data.eventName !== "onFormSubmitted") return; say(data.data && data.data.submissionValues && data.data.submissionValues.email); }); window.addEventListener("hs-form-event:on-submission:success", function (event) { var form = window.HubSpotFormsV4 && window.HubSpotFormsV4.getFormFromEvent(event); if (!form) return; form.getFormFieldValues().then(function (values) { for (var i = 0; i < values.length; i++) if (values[i].name === "0-1/email") return say(values[i].value); }, function () {}); }); })(); </script>3. Send a test submission
Open your site through any partner's link, copied from their page under Partners, and send the form. The checks on this guide in Refficks turn green as each part is seen.
Sources
Have an account? Open this guide in Refficks for your own script and the checks that show when it is working. New to Refficks? Create an account.