Universal Script: Convert 3rd party cookie to 1st party

Meghan McEnry Updated by Meghan McEnry

Some users' browsers or browser extensions may block 3rd party cookies. We highly recommend using our Universal Script in conjunction with our Conversion Tracking script. As an extra measure to ensure every referral is captured, place our Universal Script on the page your referrals are initially redirected to. If the script is on this page, it will automatically take the member's encoded information from Referral Rock's cookie and apply it to a 1st party cookie, ensuring it will not be automatically removed.

Our Universal script should be placed on every landing page. Therefore if you have multiple programs, or multiple landing pages, you will need to paste this script on each landing page

Please follow the steps below to add our Universal script to your landing page.

  1. Note your Referral Rock redirect URL. You can find this by going to Program Editor > Share > Referral Destination
  2. Follow instructions here to copy our Universal script
  3. Paste this script into the <header> HTML of all landing pages that referrals may visit
  4. Nice work! Now, in order to capture referrals, you will need to place our Conversion Tracking Script on the thank you or confirmation page after your form
Universal Script Example:
You can find your unique universal script here under 'Cookie Conversions'
(function (f, r, n, d, b, y) { b = f.createElement(r), y = f.getElementsByTagName(r)[0]; b.async = 1; b.src = n; b.id = 'RR_DIVID'; y.parentNode.insertBefore(b, y); })(document, 'script', '//example.referralrock.com/webpixel/beta/universalv03.js');

How did we do?

Conversion Tracking (JavaScript)

(Advanced) Triggering Scripts on Non-Pageload Events

Contact