Skip to content

Instantly share code, notes, and snippets.

@frankmt
Created March 12, 2018 23:58
Show Gist options
  • Save frankmt/ba476424ee6755d3628aa5cc75b8eaae to your computer and use it in GitHub Desktop.
Save frankmt/ba476424ee6755d3628aa5cc75b8eaae to your computer and use it in GitHub Desktop.
<% if current_user.present? %>
var userId = "<%= current_user.id %>"
var name = "<%= name %>";
var email = "<%= current_user.email %>";
var postcode = "<%= current_user.postcode %>";
var numberOrders = "<%= current_user.number_completed_orders %>";
// This is an example script - don't forget to change it!
FS.identify(userId, {
displayName: name,
email: email,
});
FS.setUserVars({
postcode: postcode,
numberCompletedOrders: numberOrders
});
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment