Skip to content

Instantly share code, notes, and snippets.

@seedcms
Created February 14, 2017 19:42
Show Gist options
  • Save seedcms/ebf298965a9a6770f81e76283e0a8515 to your computer and use it in GitHub Desktop.
Save seedcms/ebf298965a9a6770f81e76283e0a8515 to your computer and use it in GitHub Desktop.
RS Script
var _rsq = _rsq || [];
_rsq.push([‘_setSiteId’, ‘415’]); Jouer's site ID is 415
_rsq.push([‘_enableOnsite’]);
var email = TBD Use something like document.getelement etc etc, to get the text value, you can call .toString on it to be make sure it is a string as well
_rsq.push([‘_setUserEmail’, email]); // Pass the variable for the email in
_rsq.push(['_setUserProperties', { 'record_id': email,'email': email,'registration_source':'footer'}]); Record_id and email are required for set user props to work, use email as the record_id since it won't be available for a new user.
_rsq.push([‘_setAction’, ‘email_entered’]); // Makes sure the user is created in our DB
_rsq.push([‘_track’]);
(function() {
var rScix = document.createElement('script');
rScix.type = 'text/javascript';
rScix.async = true;
rScix.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'd1stxfv94hrhia.cloudfront.net/waves/v2/w.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(rScix);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment