Showing the Invite-a-Friend Form in a Popup
Installing the Invite-a-Friend Popup
Step 1: Ensure the Prefinery JavaScript snippet is installed on each web page where you want the Invite-a-Friend Form to be available.
Step 2: Add a HTML object (such as a link or button) to your website and give it a DOM class of "prefinery-invite-a-friend-cta". For example:
<button type="button" class="prefinery-invite-a-friend-cta"
data-prefinery-tester-hash="REPLACE-WITH-HASH-OF-LOGGED-IN-TESTER-EMAIL-AND-SECRET-DECODER-KEY">Invite a Friend!</button>
How Do I Calculate the Tester Hash?
The tester hash for each of your testers is simply a SHA1 hex digest of your project's secret invitation decoder key followed by the their e-mail address. This value is calculated similar to how an invitation code is validated, as described here. This is a security measure to ensure invitations aren't sent on someone else's behalf.
Additional Configuration Settings
Here is a complete reference of all settings you can pass to the Invite-a-Friend popup. Just add any of these as data attributes in your call to action which triggers the popup.
Attribute | Value | Description |
---|---|---|
data-prefinery-tester-hash | string | The tester hash identifies the tester who will be sending invitations and is simply a SHA1 hex digest of your secret invitation decoder key followed by the tester's e-mail address. |