Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ package-lock.json
yarn-error.log
dist/
build/
.idea/
6 changes: 4 additions & 2 deletions integrations/appcues/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ var load = require('@segment/load-script');

var Appcues = integration('Appcues')
.global('Appcues')
.option('appcuesId', '');
.option('appcuesId', '')
.option('domain', '');

/**
* Initialize.
Expand Down Expand Up @@ -47,7 +48,8 @@ Appcues.prototype.loaded = function() {

Appcues.prototype.load = function(callback) {
var id = this.options.appcuesId || 'appcues';
load('//fast.appcues.com/' + id + '.js', callback);
var domain = this.options.domain || '//fast.appcues.com/';
load(domain + id + '.js', callback);
};

/**
Expand Down
4 changes: 3 additions & 1 deletion integrations/appcues/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ describe('Appcues', function() {
var appcues;
var analytics;
var options = {
appcuesId: '1663'
appcuesId: '1663',
domain: '//fast.appcues.net/'
};

// Disable AMD for these browser tests.
Expand Down Expand Up @@ -42,6 +43,7 @@ describe('Appcues', function() {
integration('Appcues')
.global('Appcues')
.option('appcuesId', '')
.option('domain', '')
);
});

Expand Down