Last active
February 18, 2022 21:44
-
-
Save sb8244/d05dc18d9f5b7a440dcd1a2a7e9ae06e to your computer and use it in GitHub Desktop.
Clove Intercom example. Read more at https://hub.clovecx.com/hc/a/Intercom-Chat-Widget-1cb767c1b30a4b1da310243934b4cf69
This file contains 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
{% 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