Last active
December 7, 2016 17:21
-
-
Save denishpatel/331ac332c31429f8fe9d7152a0b07302 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>/* Chameleon - better user onboarding */!function(t,n,o){var a="chmln",c="setup identify alias track set show on off custom help _data".split(" ");n[a]||(n[a]={}),n[a].accountToken=o,n[a].location=n.location.href.toString();for(var e=0;e<c.length;e++)!function(){var t=n[a][c[e]+"_a"]=[];n[a][c[e]]=function(){t.push(arguments)}}();var s=t.createElement("script");s.src="https://fast.trychameleon.com/messo/"+o+"/messo.min.js",s.async=!0,t.head.appendChild(s)}(document,window,"SAtlPjYMWGA1jiV7AYF1D38gSa7SE9xEoRdJwPkr58eIyh-1C3H6Z-ztbpXMzr0tGiPmve"); | |
chmln.identify({uid: user.id /* A stable, unique identifier */, email: user.email, created: user.created_at /* Timestamp when the user was added to your system */}) | |
</script> | |
proposed: | |
{% if current_membership != None %} | |
!function(t,n,o){var a="chmln",c="setup identify alias track set show on off custom help _data".split(" ");n[a]||(n[a]={}),n[a].accountToken=o,n[a].location=n.location.href.toString();for(var e=0;e<c.length;e++)!function(){var t=n[a][c[e]+"_a"]=[];n[a][c[e]]=function(){t.push(arguments)}}();var s=t.createElement("script");s.src="https://fast.trychameleon.com/messo/"+o+"/messo.min.js",s.async=!0,t.head.appendChild(s)}(document,window,"SAtlPjYMWGA1jiV7AYF1D38gSa7SE9xEoRdJwPkr58eIyh-1C3H6Z-ztbpXMzr0tGiPmve"); | |
chmln.identify({ | |
id: '{{ current_membership.id }}', | |
email: '{{ current_membership.user.email }}', | |
created: '{{ current_membership.user.date_joined }}' | |
}); | |
</script> | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment