Skip to content

Instantly share code, notes, and snippets.

LIOLookIOManager *lookIO = [LIOLookIOManager sharedLookIOManager];
[lookIO setCustomVariable:@"654321" forKey:@"customer_id"];
LIOLookIOManager *lookIO = [LIOLookIOManager sharedLookIOManager];
NSString* customerId = [lookIO customVariableForKey:@"customer_id"];
LIOLookIOManager *lookIO = [LIOLookIOManager sharedLookIOManager];
[lookIO clearCustomVariables];
@grantmiller
grantmiller / lp-mobile-conversion.js
Last active December 21, 2015 03:29
LP Mobile Conversion sample
/**
* Reports custom events to the LivePerson Agent Console and reporting system.
* @param {string} name of the event
* @param {Object} mixed data associated with the event
*/
/**
* Predefined event name constants
*/
LPMobile.LP_EVENT_CONVERSION;
@grantmiller
grantmiller / lp-mobile-html-custom-variables.html
Created August 15, 2013 18:45
LP Mobile HTML Plugin Custom Variables
<script type="text/javascript">
/* LP Mobile JS Configuration */
var _LP_CFG_ = {
app_id : "YOUR_MOBILE_SITE_ID",
options : {
// All configuration options defined in here
extras : function() { // A static dictionary or a function that returns a dictionary of custom variables
var extras = {'varName1': 'varValue1',
'varName2': 'varValue2'};
return extras;
@grantmiller
grantmiller / lp-mobile-html-offline-action.html
Created August 15, 2013 18:58
LP Mobile HTML Plugin custom offline action (onChatNotAnswered)
<script type="text/javascript">
/* LP Mobile JS Configuration */
var _LP_CFG_ = {
app_id : "YOUR_MOBILE_SITE_ID",
options : {
// All configuration options defined in here
onChatNotAnswered : function(messages) { // An event that fires after a message is sent by the user but agents are no longer available. It takes one parameter which is an array of the messages attempted to be sent by the user.
alert('All chat agents are currently helping other customers. Please call our customer service center at 800-555-5555');
}
}
@grantmiller
grantmiller / lp-mobile-custom-button.html
Created August 15, 2013 22:45
lp mobile html plugin create a custom button by identifying the triggerSelector
<script type="text/javascript">
/* LP Mobile JS Configuration */
var _LP_CFG_ = {
app_id : "YOUR_MOBILE_SITE_ID",
options : {
// All configuration options defined in here
triggerSelector : '.help-btn' // Replace with a selector to your help button(s)
}
};
/* End of Configuration */
@grantmiller
grantmiller / lp-mobile-responsive-viewport.html
Created August 22, 2013 23:10
LP Mobile HTML Plugin meta viewport for responsive sites
<script type="text/javascript">if(window.screen.width <= 740){ document.write('<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, width=device-width">');}</script>
@grantmiller
grantmiller / lp-mobile-skill
Created December 16, 2013 20:01
changing the skill for LP Mobile html plugin
<script type="text/javascript">
/* LP Mobile JS Configuration */
var _LP_CFG_ = {
app_id : "YOUR_MOBILE_SITE_ID",
options : {
// All configuration options defined in here
skill : 'new-mobile-skill' // Replace with registered mobile skill
}
};
/* End of Configuration */
<button onclick="LPMobile.setSkill('new-mobile-skill')">Set new mobile skill</button>