Created
August 19, 2016 07:29
-
-
Save eagleon/ad7e397da8d21509d9674384d1728370 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="stylesheet" href="https://js.appboycdn.com/web-sdk/1.4/appboy.min.css" /> | |
<script type="text/javascript"> | |
+function(a,p,P,b,y) { | |
appboy={};for(var s="destroy toggleAppboyLogging setLogger openSession changeUser requestImmediateDataFlush requestFeedRefresh subscribeToFeedUpdates logCardImpressions logCardClick logFeedDisplayed requestInAppMessageRefresh logInAppMessageImpression logInAppMessageClick logInAppMessageButtonClick subscribeToNewInAppMessages removeSubscription removeAllSubscriptions logCustomEvent logPurchase isPushSupported isPushBlocked registerAppboyPushMessages unregisterAppboyPushMessages submitFeedback ab ab.User ab.User.Genders ab.User.NotificationSubscriptionTypes ab.User.prototype.getUserId ab.User.prototype.setFirstName ab.User.prototype.setLastName ab.User.prototype.setEmail ab.User.prototype.setGender ab.User.prototype.setDateOfBirth ab.User.prototype.setCountry ab.User.prototype.setHomeCity ab.User.prototype.setEmailNotificationSubscriptionType ab.User.prototype.setPushNotificationSubscriptionType ab.User.prototype.setPhoneNumber ab.User.prototype.setAvatarImageUrl ab.User.prototype.setLastKnownLocation ab.User.prototype.setUserAttribute ab.User.prototype.setCustomUserAttribute ab.User.prototype.addToCustomAttributeArray ab.User.prototype.removeFromCustomAttributeArray ab.User.prototype.incrementCustomUserAttribute ab.InAppMessage ab.InAppMessage.SlideFrom ab.InAppMessage.ClickAction ab.InAppMessage.DismissType ab.InAppMessage.OpenTarget ab.InAppMessage.prototype.subscribeToClickedEvent ab.InAppMessage.prototype.subscribeToDismissedEvent ab.InAppMessage.prototype.removeSubscription ab.InAppMessage.prototype.removeAllSubscriptions ab.InAppMessage.Button ab.InAppMessage.Button.prototype.subscribeToClickedEvent ab.InAppMessage.Button.prototype.removeSubscription ab.InAppMessage.Button.prototype.removeAllSubscriptions ab.SlideUpMessage ab.ModalMessage ab.FullScreenMessage ab.ControlMessage ab.Feed ab.Feed.prototype.getUnreadCardCount ab.Card ab.ClassicCard ab.CaptionedImage ab.Banner display display.automaticallyShowNewInAppMessages display.showInAppMessage display.showFeed display.destroyFeed display.toggleFeed sharedLib".split(" "),i=0;i<s.length;i++){for(var k=appboy,l=s[i].split("."),j=0;j<l.length-1;j++)k=k[l[j]];k[l[j]]=function(){}}appboy.initialize=function(){console&&console.log("Appboy cannot be loaded - this is usually due to strict corporate firewalls or ad blockers.")};appboy.getUser=function(){return new appboy.ab.User};appboy.getCachedFeed=function(){return new appboy.ab.Feed}; | |
(y = a.createElement(p)).type = 'text/javascript'; | |
y.src = 'https://js.appboycdn.com/web-sdk/1.4/appboy.min.js'; | |
(c = a.getElementsByTagName(p)[0]).parentNode.insertBefore(y, c); | |
if (y.addEventListener) { | |
y.addEventListener("load", b, false); | |
} else if (y.readyState) { | |
y.onreadystatechange = b; | |
} | |
}(document, 'script', 'link', function() { | |
appboy.initialize('aeb80439-a4a1-41df-aa09-0d58924e92c6'); | |
appboy.display.automaticallyShowNewInAppMessages(); | |
/* | |
* If you have a unique identifier for this user (e.g. they are logged into your site) it's a good idea to call | |
* changeUser here. | |
* See https://js.appboycdn.com/web-sdk/latest/doc/module-appboy.html#.changeUser for more information. | |
*/ | |
// appboy.changeUser(userIdentifier); | |
appboy.openSession(); | |
/* | |
* By default, in-app messages are only refreshed every 10 minutes as part of the openSession call. Additionally, | |
* they are not refreshed on a new anonymous user's first-ever session. If you want them refreshed as part of every | |
* page load instead, uncomment this line - note that depending on your website's architecture and messaging strategy, | |
* this may cause users to receive messages very frequently as they navigate around the site, and therefore may not be | |
* desirable. | |
*/ | |
// appboy.requestInAppMessageRefresh(); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment