Add this to the <head> of every page a creator link can land on.
<script src="https://partners.refermate.com/api/pn/sdk/v1.js" data-rm-consent-mode="explicit" data-rm-max-age-days="30" defer></script>data-rm-consent-mode="explicit", it stores and reads nothing until you call window.RefermateCapture.grantConsent(), and that holds on every page: call it on each page load once the shopper has accepted, including checkout, or getClick() returns null. The click is captured only on the landing page, so it is lost if consent arrives after the shopper leaves it.grantConsent() once window.RefermateCapture exists, for example from the script tag's load event.window.RefermateCapture.checkoutMetadata() with the order: rm_click becomes click_id and rm_soft_click becomes soft_click_id in the paid-order postback. Send either or both when present. getClick() returns only the currently preferred click; keeping both lets Refermate apply the attribution window at payment time. Include an applied referral code as discount_code, even when there is no click._refermate_click, host-only and SameSite=Lax. data-rm-max-age-days asks for 1 to 365 days (default 30), and a landing's rm_exp cuts it to what is left of that click's attribution window. Browsers can expire it sooner: Safari keeps cookies set by scripts for at most 7 days. The last click wins.defer.Add this to the <head> of every page a creator link can land on.
<script src="https://partners.refermate.com/api/pn/sdk/v1.js" data-rm-consent-mode="explicit" data-rm-max-age-days="30" defer></script>data-rm-consent-mode="explicit", it stores and reads nothing until you call window.RefermateCapture.grantConsent(), and that holds on every page: call it on each page load once the shopper has accepted, including checkout, or getClick() returns null. The click is captured only on the landing page, so it is lost if consent arrives after the shopper leaves it.grantConsent() once window.RefermateCapture exists, for example from the script tag's load event.window.RefermateCapture.checkoutMetadata() with the order: rm_click becomes click_id and rm_soft_click becomes soft_click_id in the paid-order postback. Send either or both when present. getClick() returns only the currently preferred click; keeping both lets Refermate apply the attribution window at payment time. Include an applied referral code as discount_code, even when there is no click._refermate_click, host-only and SameSite=Lax. data-rm-max-age-days asks for 1 to 365 days (default 30), and a landing's rm_exp cuts it to what is left of that click's attribution window. Browsers can expire it sooner: Safari keeps cookies set by scripts for at most 7 days. The last click wins.defer.