Skip to content

Commit 4c7f06d

Browse files
authored
Adding regional api support for intercom (#697)
* adding regional api support for intercom * bump version
1 parent 5640364 commit 4c7f06d

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

integrations/intercom/HISTORY.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
3.1.0 / 2022-09-06
2+
==================
3+
* Adding region support
14

25
3.0.0 / 2017-08-21
36
==================

integrations/intercom/lib/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ var Intercom = (module.exports = integration('Intercom')
2323
.option('activator', '#IntercomDefaultWidget')
2424
.option('appId', '')
2525
.option('richLinkProperties', [])
26+
.option('apiBase', '')
2627
.tag('<script src="https://widget.intercom.io/widget/{{ appId }}">'));
2728

2829
/**
@@ -206,6 +207,9 @@ Intercom.prototype.bootOrUpdate = function(opts, integrationSettings) {
206207
var method = this.booted === true ? 'update' : 'boot';
207208
var activator = this.options.activator;
208209
options.app_id = this.options.appId;
210+
if (this.options.apiBase) {
211+
options.api_base = this.options.apiBase;
212+
}
209213

210214
// Intercom, will force the widget to appear if the selector is
211215
// #IntercomDefaultWidget so no need to check inbox, just need to check that

integrations/intercom/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@segment/analytics.js-integration-intercom",
33
"description": "The Intercom analytics.js integration.",
4-
"version": "3.0.2",
4+
"version": "3.1.0",
55
"keywords": [
66
"analytics.js",
77
"analytics.js-integration",

0 commit comments

Comments
 (0)