#Frontier
=======================
Frontier SDK to connect to Frontier's Analytics API
You have several options:
# Bower
bower install frontier
# NPM (Coming soon)
npm i frontier
<script src="https://cdn.rawgit.com/4LOOPph/frontier/v1.0.15/dist/frontier.js"></script>
or
<script src="https://cdn.rawgit.com/4LOOPph/frontier/v1.0.15/dist/frontier.min.js"></script>
Note: frontier for LOCAL is not safe and usable for production nor staging test.
In your 'deviceready' handler, set up your Frontier tracker:
/*
PARAMETERS
@accessCode - string
@trackerName - string
@encoding - string
*/
window.Frontier.Initialize({
accessCode: 'XXXXXXXXXXXXXXX',
trackerName: 'tracker-name',
encoding: 'utf-8'
});
where XXXXXXXXXXXXXXX is your ** Symphony Access Code** base on your subscription
window.Frontier.enableAppDebugging(true);
Note: set true to enable debugging mode, default: false
If set to a truthy value then debugging mode is enabled with Frontier.
All trackers with isEnableDebugging: true
will enable for debugging mode.
window.Frontier.enableTrackEvent(true);
Note: set true to enable Event Tracking, default: false
If set to a truthy value then the event tracking is enable with Frontier Analytics.
All trackers with IsEnableTrackEvent: true
will enable for Event Tracking with Frontier.
window.Frontier.enableTrackPage(true)
Note: set true to enable Page Tracking, default: false
If set to a truthy value then the page tracking is enable with Frontier Analytics.
All trackers with IsEnableTrackPage: true
will enable for Page Tracking with Frontier.
window.Frontier.enableTrackView(true)
Note: set true to enable View / Screen Tracking, default: false
If set to a truthy value then the event tracking is enable with Frontier Analytics.
All trackers with IsEnableTrackView: true
will enable for View/Screen Tracking with Frontier.
window.Frontier.enableTrackApp(true)
Note: set true to enable App Tracking, default: false
If set to a truthy value then the event tracking is enable with Frontier Analytics.
All trackers with IsEnableTrackApp: true
will enable for App Tracking with Frontier.
window.Frontier.enableTrackDevice(true)
Note: set true to enable Device Tracking, default: false
If set to a truthy value then the event tracking is enable with Frontier Analytics.
All trackers with IsEnableTrackDevice: true
will enable for Device Tracking with Frontier.
/*
PARAMETERS
@screenName - string
*/
window.Frontier.screenTrack({
screenName:'Screen Title'
});
/*
PARAMETERS
@category - string
@action - string
@label - string
@value - integer
*/
window.Frontier.eventTrack({
eventCategory:'Category',
eventAction:'Action',
eventLabel:'Label',
eventValue:'Value'
});
Note: eventLabel and eventValue are optional
/*
PARAMETERS
@title - string
@location - string
@page - string
*/
window.Frontier.pageTrack({
title:'Page Title',
location:'Page URL',
page:'Page'
});
/*
PARAMETERS
@appName - string
@appID - string
@appVersion - string
@appInstallerID - stirng
*/
window.Frontier.appTrack({
appName: 'App Name',
appID: 'XXXX-YYY-ZZZ',
appVersion:'1.0.0',
appInstallerID: 'XXX-YY-1.0.0'
});
/*
PARAMETERS
@deviceID - string
@deviceName - string
@deviceBrand - string
@deviceModel - string
@osName - string
@osVersion - string
@screenResolution - string
@serviceProvider - string
*/
window.Frontier.deviceTrack({
deviceID:'deviceID',
deviceName:'deviceName',
deviceBrand:'deviceBrand',
deviceModel:'deviceModel',
osName:'osName',
osVersion:'osVersion',
screenResolution:'screenResolution',
serviceProvider:'serviceProvider'
});
/*
PARAMETERS
@userId - string
*/
window.Frontier.setUserId('userId')
Note: 'userId' must in a string form or type of string even its a number, decimal and other numeric figure
window.Frontier.getViewPortSize()
window.Frontier.getScreenResolution()
window.Frontier.getScreenColorDepth()
window.Frontier.getLanguage()
window.Frontier.getOperatingSystem()
window.Frontier.getOperatingSystemVersion()
window.Frontier.getDeviceID()
window.Frontier.getDeviceName()
window.Frontier.getDeviceModel()
window.Frontier.getDeviceBrand()
window.Frontier.getAppID()
window.Frontier.getAppName()
window.Frontier.getAppVersion()
window.Frontier.getInitialized()
window.Frontier.Reset()
Note: Use Analytics Reset when you want to clear Analytics cache. This means everything on analytics initialization is cleared and a browser reload/refresh is required
window.Frontier.signOut()
Note: Use Analytics Signout when you want to signout Analytics active session. This means everything on analytics current session will be stop and resetted. You can use this feature on your application authentication.