- This app allows testing of the Intercom Javascript API
- Allows for testing visitors via Acquire and users
- Remember that the chat icon only shows if you have the appropriate subscriptions
- This app allows for unlimited number of apps but they need to be configured via an environment file
- Sample variables
APP1
: app_id of your 1st appAPP1_NAME
: name of 1st app (for easy reference)APP1_SECRET
: secret key for secure mode of the 1st appAPP2
: app_id of your 2nd appAPP2_NAME
: name of 2nd app (for easy reference)APP2_SECRET
: secret key for secure mode of the 2nd appAPP3
: app_id of your 3rd appAPP3_NAME
: name of 3rd app (for easy reference)APP3_SECRET
: secret key for secure mode of the 3rd app- ...
- Create a
.env
file and populate it accordingly - Sample file
APP1="abcd1234"
APP1_NAME="Production app"
APP1_SECRET="abcde12345abcde12345abcde12345abcde"
APP2="1234abcd"
APP2_NAME="Test app"
APP2_SECRET=""
- Install bundler for depedency management:
gem install bundler
- Install dependencies:
bundle install
- Setup environment variables as detailed in section above
- Run:
ruby app.rb
- Open http://localhost:4567/
- Install Pow: http://pow.cx
- Go to Pow directory and set up the link to this directory
cd ~/.pow
ln -s ~/src/intercom-testing-js-api intercomtest
- Setup environment variables as detailed in section above
- open http://intercomtest.dev
- Click the "Deploy to Heroku button"
- Be warned that Acquire depends on the Messenger being able to create a first-party cookie for *.customer-domain.com. This will fail (with modern browsers) on *.customer-app.firebaseapp.com and *.customer-app.herokuapp.com, or any domain registered as a public suffix, https://publicsuffix.org [Source - Intercom Docs]