Created
June 22, 2015 14:26
-
-
Save slorber/63234ef51b9ff2d8c9a1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script id="IntercomSettingsScriptTag"> | |
var creationDate = @bootstrapData.user.userData.creationDate; | |
var creationDateString = creationDate.toString(); | |
var creationDateTruncated = creationDateString.substring(0,10); | |
window.intercomSettings = { | |
name: "@bootstrapData.user.userData.fullname", | |
user_id: "@bootstrapData.user.userData.id", | |
email: "@bootstrapData.user.userData.email", | |
created_at: creationDateTruncated, | |
user_hash: "@bootstrapData.intercomConfig.userHash", | |
app_id: "@bootstrapData.intercomConfig.appId", | |
preferred_language: "@bootstrapData.user.details.persistentUIState.preferredLanguage.getOrElse("")", | |
nb_friends: @bootstrapData.userRelationships.length, | |
nb_sharings_created: @bootstrapData.sharings.sharedByMe.size, | |
nb_sharings_member: @bootstrapData.sharings.sharedToMe.size, | |
nb_stamples: @bootstrapData.userStats.stampleStats.stampleCount, | |
nb_visible_stamples: @bootstrapData.userStats.stampleStats.visibleStampleCount, | |
nb_favorite_stamples: @bootstrapData.userStats.stampleStats.favoriteStampleCount, | |
nb_categories: @bootstrapData.userStats.categoryStats.categoryCount, | |
nb_visible_categories: @bootstrapData.userStats.categoryStats.visibleCategoryCount, | |
nb_invitations_completed: @bootstrapData.userStats.invitations.successfulInvitationsCount, | |
nb_invitations_pending: @bootstrapData.userStats.invitations.pendingInvitationsCount | |
}; | |
</script> | |
<script>(function(){var w=window;var ic=w.Intercom;if(typeof ic==="function"){ic('reattach_activator');ic('update',intercomSettings);}else{var d=document;var i=function(){i.c(arguments)};i.q=[];i.c=function(args){i.q.push(args)};w.Intercom=i;function l(){var s=d.createElement('script');s.type='text/javascript';s.async=true;s.src='https://static.intercomcdn.com/intercom.v1.js';var x=d.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x);}if(w.attachEvent){w.attachEvent('onload',l);}else{w.addEventListener('load',l,false);}}})()</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment