The Localytics Web SDK is optimized
for integration on both desktop and mobile web apps.
Session management is handled automatically with this script. You do not need to make
any calls to open, close, or upload.
-
Log into your Localytics
account, or create an account if you don't have one.
-
In the Dashboard, create a
new application and copy the application key.
-
In each HTML file, include the following code at the end of the <head>
section.
<script>
+function(l,y,t,i,c,s) {
l['LocalyticsGlobal'] = i;
l[i] = function() { (l[i].q = l[i].q || []).push(arguments) };
l[i].t = +new Date;
(s = y.createElement(t)).type = 'text/javascript';
s.src = '//web.localytics.com/v3/localytics.min.js';
(c = y.getElementsByTagName(t)[0]).parentNode.insertBefore(s, c);
ll('init', 'YOUR_APP_KEY', {} /* Options */);
}(window, document, 'script', 'll');
</script>
Congratulations! You're integrated. Check out the data in your
Dashboard or get even more insights
when you start
tagging
events.