Skip to content

Use the native intercom SDK with your cordova app

License

Notifications You must be signed in to change notification settings

asku/cordova-intercom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hey, the awesome guys at Intercom released an official cordova plugin. Use that instead!

cordova-intercom

Install

$ cordova plugin add co.asku.cordova.intercom --variable API_KEY="ios_sdk-0000..." --variable APP_ID="zz..."

JS API

All functions are on the cordova.plugins.intercom object.

startSession

Starts the user's session using their unique identifier (either or email or id).

cordova.plugins.intercom.startSession({ id: 1 });
// OR
cordova.plugins.intercom.startSession({ email: '[email protected]' });

openMessages

Opens the Intercom messages list UI.

cordova.plugins.intercom.openMessages();

updateAttributes

Updates the user properties for this user in Intercom.

cordova.plugins.intercom.updateAttributes({
  name: 'Josh',
  favorite_pizza: 'pepperoni'
});

logEvent

Sends a user interaction event to Intercom.

cordova.plugins.intercom.logEvent('ate-pizza', {
  flavor: 'cheese'
});

checkForUnreadMessages

Tell Intercom to look for unread messages and present them to the user, overlayed on the web content. It's recommended to call this between each page view.

cordova.plugins.intercom.checkForUnreadMessages();

About

Use the native intercom SDK with your cordova app

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •