Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@sb8244
Last active February 18, 2022 21:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sb8244/d05dc18d9f5b7a440dcd1a2a7e9ae06e to your computer and use it in GitHub Desktop.
Save sb8244/d05dc18d9f5b7a440dcd1a2a7e9ae06e to your computer and use it in GitHub Desktop.
{% if user %}
<script>
window.intercomSettings = {
app_id: "YOUR_APP_ID",
user_id: "{{ user.id }}",
email: "{{ user.email }}",
user_hash: "{{ user.id | encrypt: "hmac", "YOUR_IDENTITY_VERIFICATION_SECRET" }}"
};
</script>
{% else %}
<script>
window.intercomSettings = {
app_id: "YOUR_APP_ID"
};
</script>
{% endif %}
<script>
// The pre-populated script from Step 1
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment