Skip to content
This repository has been archived by the owner on Jul 23, 2018. It is now read-only.
/ cordova-intercom Public archive
forked from asku/cordova-intercom

Use the native intercom SDK with your cordova app

License

Notifications You must be signed in to change notification settings

Anu2g/cordova-intercom

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Languages

  • Objective-C 99.3%
  • SaltStack 0.7%