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 landing page URL. You can find this by going to the Program Editor > Referral page, and find this link under the "Conversion Tracking" header on the right side of the screen
  2. Follow instructions here to copy our Universal script
  3. Paste this script into the <header> HTML of your landing page
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