Analytics scripts often require you to pass a currently signed-in member's information inside their JavaScript code snippet.

We've added a global window.circleUser object for this purpose, which makes the following information accessible from your custom code snippet:
  • email
  • name
  • firstName
  • lastName
  • isAdmin (true/false)
  • isModerator (true/false)
  • location
  • profileUrl
  • publicUid (the member's unique Circle ID)
  • linkedinUrl
  • twitterUrl
  • facebookUrl
  • websiteUrl

An example of how you would use this data inside an identify() call:

FS.identify(circleUser.publicUid, {
   isAdmin: circleUser.isAdmin,
   profileUrl: circleUser.profileUrl

As a reminder, you can add custom JavaScript and CSS code snippets to your <head> section by navigating to Settings β†’ Code Snippets.

Thanks to everyone who suggested this improvement. Leave questions or comments below!
This is a great addition!!

The only area missing for this to be compatible with Intercom embeds would be an encrypted user_hash of the email address or userID with SHA256. Full Story also requires email_hmac for FS.identify.
In FullStory's case, circleUser.publicUid could for the UID (it looks like they suggest the hmac as a backup in the absence of one):

For Intercom's encrypted user_hash, could customers use an externally loaded SHA256 plugin? Here's anΒ example.
Sid YadavΒ If I'm reading the documentation correctly for the externally loaded SHA256 plugin, I don't think there's a way to keep the server side secret key private that's provided by Intercom.
The combination of this plus customized profiles (when completed) opens up A TON of possibilities
Thanks for listening to my feedback and implementing this πŸ™ŒπŸ’“
Does this mean I could for example send specific member activity to their profile in my CRM?
Asser Smidt These are member attributes, which you can pass to your CRM via its JS tracking script if it has a way to identify members. For activity (posts, comments, etc) you could look into setting up a Zapier integration - e.g when the β€œNew Topic Posted” event is triggered in Circle, have a β€œNew Event” action from your CRM create a tracking event if it supports Zapier.

Post a comment

Log in