X I T Y L A N A K C A T S

الوثائق & الربط

ستاك انالتيكس تدعم جميع المواقع الالكترونية وتطبيقات الهاتف المحمول

المواقع الإلكترونية

سوف نقوم باستدعاء الكود التالي في نهاية ال body

سوف تحتاج قيمة ClientId و WebsiteId سوف تجدها في لوحة التحكم

<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>

تطبيقات الهاتف

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();
              List
        activities=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
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

هل لديك اي اسئلة؟

تواصل معنا