S
T
A
C
K
A
N
A
L
Y
T
I
X
Documentation & Integration
We Support Websites and Mobile Apps
Websites Integration
Copy this JS Code to your website head section
Please replace the WebsiteId and ClientId from the Dashbaord
<script> (function (s, t, a, c, k) { t.src = t.src; var d = document.createElement('script'); for (var attr in t) { d.setAttribute(attr, t[attr] ? t[attr] : null) } d.innerHTML = a; d.onload = function () { new StackAnalytix("" + c, "" + k).Start() } document.body.appendChild(d); })(32, { src: 'https://api.stkeg-cdn.com/v1/tracking/pixel', type: 'text/javascript', async: null }, '', @Model.WbsiteId, @Model.ClientId); </script>
Mobile Apps Integration
Step 1. Add the JitPack repository to your build file Add it in your root build.gradle at the end of repositories:
allprojects { repositories { ... maven { url 'https://jitpack.io' } } }
Step 2. Add the dependency in your module build.gradle
dependencies { implementation 'com.github.StackAnalysis:STKDroid:0.2.3' }
Step 3. The best place to initialize the StackAnalytix is in the onCreate method of your application subclass.
public class BaseApplication extends Application { @Override public void onCreate() { super.onCreate(); Listactivities=new ArrayList<>(); activities.add(DeliveryActivity.class.getName()); new StackAnalytix.Builder() .setContext(this) .setAppId( ) .setClientId() .setkey(" ") .setScreenRecorder(true) .setSkipRecorderActivities(activities)//skip some activities during screen recorder .setOnCrashListener(new OnCrashListener() { @Override public void onCrash(@Nullable String crashInfo, @Nullable Throwable e) { } }).setOnLoggerListener(new OnLoggerListener() { @Override public void onLogI(@Nullable String tag, @Nullable String msg) { } @Override public void onLogD(@Nullable String tag, @Nullable String msg) { } @Override public void onLogE(@Nullable String tag, @Nullable String msg) { } @Override public void onLogV(@Nullable String tag, @Nullable String msg) { } @Override public void onLogW(@Nullable String tag, @Nullable String msg) { } }) .build(); } }
StackAnalytix Crash . StackAnalytix Crash Android integration detects and reports crashes from uncaught Java or Kotlin exceptions as well as ANRs.
try { // Some potentially crashy code } catch (e: Throwable) { StackAnalytix.customCrash(e) }
Javascript API
You can Use this Apis to call some advanced function for more functionality
STKAPP.VisitorId
//this will retrive the visitor id UUID genered by stack analytix
STKAPP.FireTag("eventcode")
//this allow you send custom event for stack analytix also connected to session replay
STKAPP.SessionTag("event_code", {payload object})
//this allow you send custom event for stack analytix attatched with Session Replay
STKAPP.SetUserIdOrEmail("userid")
> //this allow you give your user a uniqe user id such as email
STKAPP.SetMetadata("metaKey","meta_value")
//You can assign a meta data for user during session recording
Please Notes FireTag and Session Tag will help you in retargeting your users on social media platforms and google through pixel integration..