# Intercom integration with Discourse?

**URL:** <https://meta.discourse.org/t/intercom-integration-with-discourse/106280>\
**Category:** Product Support\
**Created:** [January 11, 2019, 2:10pm UTC](https://meta.discourse.org/t/intercom-integration-with-discourse/106280 "2019-01-11T14:10:13Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![dax](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dax/32/244677_2.png) [@dax](https://meta.discourse.org/u/dax)\
**Post date:** [January 14, 2019, 5:24pm UTC](https://meta.discourse.org/t/intercom-integration-with-discourse/106280/4 "2019-01-14T17:24:38Z")

</div>

Hi Rob, I think you can do it if you add variables to the script, for example:

```plaintext
<script>
$.getJSON("/session/current.json", function(json) {
    var userusername = String(json.current_user.username);
    var currentname = String(json.current_user.name);
    var pathtojson = "/users/" + userusername + ".json";
    $.getJSON(pathtojson, function(json){
        var useremail = String(json.user.email);
        var createdatuser = String(json.user.created_at);

        window.intercomSettings = {
            app_id: '[APP_ID]',
            email: useremail,
            name: currentname,
            created_at: createdatuser,
            "discourse_username": userusername,
        };
    });
});
</script>

```

---

_[View the full topic](https://meta.discourse.org/t/intercom-integration-with-discourse/106280)._
