Access Script

If you have user information available on your site (via a login area, form, or sale confirmation page, or a URL with user parameters), you can use our Access Script to automatically log members onto their dashboard for easy sharing and can optionally auto-register a new member if they are not yet registered for that particular program.

The script works by replacing an iFrame or anchor link targeted by ID, with an automatically generated Referral Rock iFrame or widget that contains the member parameters you pass in. While the Access Script will automatically replace the source of the iFrame, the other characteristics will stay the same. This allows you to set the width, border, and other design elements in ways that make the iFrame feel more like part of your site.

Access Script Benefits & Use Cases

  • If you allow your Members to easily sign in for instant access to their dashboard, this will create less resistance against sharing the program and generating referrals.
  • You can install the Access Script on a thank you or confirmation page. For example, a customer may make a purchase on your E-Commerce site. After they check out, their information (name, email, etc) is known when they reach your thank you/confirmation page.
  • The Access Script can pull the proper information from your site and automatically log the customer in to their Member Dashboard. The script can be customized to register a member if they do not already exist. If you choose not to automatically register members this way, if the customer is not a Member in Referral Rock, they will see the Registration Page instead.
  • If a customer can log in through a login portal on your site, it is likely that your site already knows their information (name, email, etc.). You can place the Access Script anywhere on the site that the customer can navigate to after they log in.
  • The Access Script can be shown in three different ways: iFrame (recommended), Widget, or Site.

Installation

  1. You can find this script in Settings IntegrationsMember Access Access Script or by clicking here.
  2. Depending on your needs, choose Basic or Detailed script. Basic is the most commonly used.
  3. The script works by replacing an iFrame or anchor link targeted by its ID with an automatically generated Referral Rock iFrame, widget, or site that contains the member parameters you pass in. Determine the ID and replace {{ELEMENTID}}.
    Using the HTML code for your iFrame or linkable object, you can add an ID and use that for the Access Script's reference. For example, <iframe src="UNIQUE URLid="NAME" style="background-color: white; height:800px; width:100%;"></iframe> Using the Access Script and this example, the {{ELEMENTID}} would be NAME.
  4. Customize the Required fields as seen in the table below.
    The programidentifier field is required in order for the script to determine which of your Programs to display. You can find the Program ID on the Program's details page.

    Required

    Description

    targetid

    The iFrame or anchor link that you want to replace with the automatic access iFrame.

    programidentifier

    The program you want to display. This field can reference a program's name, title, or the internal Referral Rock Program ID.

    email

    The user's email address from your system to allow member creation.

    firstname

    The user's first name from your system to allow member creation. While this can technically be left blank, it is highly recommended for future personalized communication from the Referral Rock platform.

  5. Customize optional fields
    1. view: If you would like the program to be viewed as an iFrame embedded on your site (recommended), as a Widget, or as a separate Site.
    2. addmember: Default is true. This auto-registers the member if they do not already exist in Referral Rock.
    3. useemailonnamemissing: Default is true. This uses the email address as the customer's name is no name is included.
    4. directregistrationondenied: Default is true. This redirects to the Registration Page if the customer is not able to auto register as a Member (if addmember is false), and they are not already a Member in Referral Rock.
    5. sendregemailonadd: Default follows your Program's set rules. This sends the member the Registration Email. If addmember is false, you can disregard this.
  6. Install the script on your site and test.

Example: Access Script on a Confirmation Page after E-commerce Purchase

<script type="text/javascript">
window.rrSpace = (
rrSettingsAccess = {
targetid: "{{ELEMENTID}}",
/*Target element will be replaced with referral rock iframe, embedded site, or widget*/
/*Element must include an href. Examples include <iframe> or <a>*/
debug: "false",
/*displays a iframe on page for on-page debugging*/
parameters: {
/*CONTROL PARAMETERS*/
view: "iframe",
/*Default site; Values: site, widget, iframe*/
addmember: "",
/*Default true. Auto-registers member when possible*/
useemailonnamemissing: "",
/*Default true. Uses email as name if no name included*/
directregistrationondenied: "",
/*Default true. Redirects to registration page if member auto-registration unavailable*/
sendregemailonadd: "",
/*Default programrules; Values: true, false, programrules*/
updatemember: "",
/*Default true; values: true, false if true and member exists, updates member with all demographic info*/
/*IDENTIFICATION PARAMETERS*/
programidentifier: "",
/*REQUIRED. Value can be program name, title, program ID. Only valid if exclusively one record is found*/
externalidentifier: "",
/*HIGHLY RECOMMENDED. Conditionally required if adding member (or email). Required on access if email is not used*/
fullname: "",
/*Auto parsed into first and last with a single space between*/
firstname: "",
/*HIGHLY RECOMMENDED. Conditionally required if adding member (or fullname)*/
email: ""
/*HIGHLY RECOMMENDED. Conditionally required if adding member (or externalid). Required on access if externalid is not used*/
}
}
);
(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', '//yoursite.referralrock.com/webpixel/beta/universalv03.js');
</script>

Example image of an Access Script being placed after online checkout:


How did we do?


Powered by HelpDocs

Powered by HelpDocs