Jump to content
UBot Underground

In App Http Api Tracking Through Analytics Dashboard


Recommended Posts

Hey everyone, it's been awhile scene I have been active, So I though I would come back and share something great. Ive seen through the forum that some people are wondering how "In App Tracking works" and how to do this with ubot. So I put together a few cool commands using some tools that most everyone here should already have and can install for free.
 
To use this tutorial you will need aymens HTTP plugin, Matomo analytics (formally piwik) and a hosting account that has a Softaculous installer. If you don't have a hosting account that hosts Softaculous you can download and install Matomo analytics manually. I'm not going to be going over how to do every step, just simply tell you what you need to do to get it going.

Tracking HTTP API Reference: https://developer.matomo.org/api-reference/tracking-api

1.) Setup a subdomain on your hosting, any will do i called mine http://app.tracking.mydomain.com
2.) Use Softaculous to install Matomo analytics into the subdomain folder /appstats/
3.) make a page called index.php and place it in the subdomain root folder
4.) login to Matomo analytics and get your tracking code and place it in the index.php
5.) go into Matomo analytics settings and install GeoIP lite database from MaxMind
6.) open the website stats section of Matomo analytics where your domain data resides.
7.) locate the Goals section and create 15 goals with the exact data provided below
8.) Take note of the ID number of each Goal created. Id's are created automatically
9.) Create your goals with these settings selected "Goal is triggered = manually" Allow goal to be converted more than once per visit
10.) Find your Matomo analytics API, the file is called "piwik.php"
11.) append this file to your new tracking URL, should look like this now

http://app.tracking.mydomain.com/appstats/piwik.php
12.) take this full url and replace the identical url within each command in the provided code.
13.) go through the code and make sure that the "idgoal=" is matching the goal id number from the goals you created. This is important make sure that the corresponding code functions match up to the goal descriptions.

ID    Goal Name        Goal Description

1    App Opened    In App Tracking - App Opens
2    App Started    In App Tracking - App Starts
3    App Stopped    In App Tracking - App Stops
4    App File Loaded    In App Tracking - App File Loaded
5    App File Failed    In App Tracking - Load File Failed
6    App TextBox Value    In App Tracking - TextBox Set Value
7    App Button Push    In App Tracking - Button Push
8    App Check Box    In App Tracking - App Check Box Ticked
9    App UI Window    In App Tracking - UI Window Opened
10  App Dropdown    In App Tracking - App Dropdown Value
11  App List Box    In App Tracking - App List Box Value
12  App Block Text    In App Tracking - App Block Text Value
13  App Stat Monitor    In App Tracking - App Stat Monitor Value
14  App List Total    In App Tracking - App List Total Value
15  App Table Values    In App Tracking - Rows And Columns

 

NOTE: To change the name of each action as it appears in the analytic dashboard you can change the API endpoint called "&action_name=" value to what ever you would like the action name to be. Please make sure to replace all URLS in the code to your Matomo analytics tracking url

 

 

In-App-Http-Api-Tracking.png

 

 

Everything shown here is a getting started guide and commands, you can take this many steps further if needed. If anyone needs any help getting this setup please don't hesitate to post in the thread and ask for help. Please no PM about this as I would like to keep all info organized in one thread and not privately. Hope you enjoy gaining incite into your users activity's within your software. Best of luck.

 

In-App-Http-Api-Tracking2.png

App Opened    In App Tracking - App Opens

define ApplicationOpened(#RunApplicationOpened) {
    comment("Place in onload command to
trigger a goal in your statistics
dashboard. ( App Opened )")
    set(#anti_cache,$rand(123,1234),"Global")
    set(#ApplicationOpened,$plugin function("HTTP post.dll", "$http get", "http://app.tracking.mydomain.com/appstats/piwik.php?&idsite=1&rec=1&_id={#session_id}&rand={#anti_cache}&apiv=1&idgoal=1", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0", "http://app.tracking.mydomain.org", "", 20),"Global")
    set(#ApplicationOpened,$plugin function("HTTP post.dll", "$http get", "http://app.tracking.mydomain.com/appstats/piwik.php?&idsite=1&rec=1&_id={#session_id}&rand={#anti_cache}&apiv=1&action_name=HTTP Api App Traking - Reversion Build 1.01&url=http://app.tracking.org", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0", "", "", 20),"Global")
}
on load("Tab Loaded") {
    set(#session_id,$change text casing($random text(16),"Lower Case"),"Global")
    ApplicationOpened(#RunApplicationOpened)
}

App Started    In App Tracking - App Starts & App Stopped    In App Tracking - App Stops

ui button("Start Application") {
    thread {
        AppStarted(#RunAppStarted)
    }
}
ui button("Stop Application") {
    thread {
        AppStop(#RunAppStopped)
    }
}
define AppStarted(#RunAppStarted) {
    comment("Place in Start button to
trigger a goal in your
statistics dashboard.
( App Started )")
    set(#anti_cache,$rand(123,1234),"Global")
    set(#AppStartClick,$plugin function("HTTP post.dll", "$http get", "http://app.tracking.mydomain.com/appstats/piwik.php?&idsite=1&rec=1&_id={#session_id}&rand={#anti_cache}&apiv=1&idgoal=2", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0", "http://app.tracking.mydomain.org", "", 20),"Global")
    set(#AppStartClick,$plugin function("HTTP post.dll", "$http get", "http://app.tracking.mydomain.com/appstats/piwik.php?&idsite=1&rec=1&_id={#session_id}&rand={#anti_cache}&apiv=1&action_name=HTTP Api App Traking - Reversion Build 1.01&url=http://app.tracking.org", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0", "", "", 20),"Global")
}
define AppStop(#RunAppStopped) {
    comment("Place in Stop button to
trigger a goal in your
statistics dashboard.
( App Stopped )")
    set(#anti_cache,$rand(123,1234),"Global")
    set(#AppStopClick,$plugin function("HTTP post.dll", "$http get", "http://app.tracking.mydomain.com/appstats/piwik.php?&idsite=1&rec=1&_id={#session_id}&rand={#anti_cache}&apiv=1&idgoal=3", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0", "http://app.tracking.mydomain.org", "", 20),"Global")
    set(#AppStopClick,$plugin function("HTTP post.dll", "$http get", "http://app.tracking.mydomain.com/appstats/piwik.php?&idsite=1&rec=1&_id={#session_id}&rand={#anti_cache}&apiv=1&action_name=HTTP Api App Traking - Reversion Build 1.01&url=http://app.tracking.org", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0", "", "", 20),"Global")
}

App File Loaded    In App Tracking - App File Loaded & App File Failed    In App Tracking - Load File Failed

ui open file("Load File",#LoadedFile)
thread {
    if($comparison(#LoadedFile,"!= Does not equal",$nothing)) {
        then {
            FileLoaded(#RunFileLoaded)
        }
        else if($comparison(#LoadedFile,"= Equals",$nothing)) {
            FileLoadFail(#RunFileLoadFail)
        }
    }
}
define FileLoaded(#RunFileLoaded) {
    comment("Place after load file
( App File Loaded )")
    set(#anti_cache,$rand(123,1234),"Global")
    set(#AppLoadedFile,$plugin function("HTTP post.dll", "$http get", "http://app.tracking.mydomain.com/appstats/piwik.php?&idsite=1&rec=1&_id={#session_id}&rand={#anti_cache}&apiv=1&idgoal=4", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0", "http://app.tracking.mydomain.org", "", 20),"Global")
    set(#file_name,$find regular expression(#LoadedFile,"[A-Za-z.0-9_-]+\\.[a-z]+"),"Global")
    set(#LoadFileFail,$plugin function("HTTP post.dll", "$http get", "http://app.tracking.mydomain.com/appstats/piwik.php?&idsite=1&rec=1&_id={#session_id}&rand={#anti_cache}&apiv=1&action_name=File Name = {#file_name}&url=http://app.tracking.org", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0", "http://app.tracking.mydomain.org", "", 20),"Global")
}
define FileLoadFail(#RunFileLoadFail) {
    comment("Place after load file
( App Failed To Load File )")
    set(#anti_cache,$rand(123,1234),"Global")
    set(#LoadFileFail,$plugin function("HTTP post.dll", "$http get", "http://app.tracking.mydomain.com/appstats/piwik.php?&idsite=1&rec=1&_id={#session_id}&rand={#anti_cache}&apiv=1&idgoal=5", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0", "http://app.tracking.mydomain.org", "", 20),"Global")
}

App TextBox Value    In App Tracking - TextBox Set Value

ui open file("Load File",#LoadedFile)
thread {
    if($comparison(#LoadedFile,"!= Does not equal",$nothing)) {
        then {
            FileLoaded(#RunFileLoaded)
        }
        else if($comparison(#LoadedFile,"= Equals",$nothing)) {
            FileLoadFail(#RunFileLoadFail)
        }
    }
}
define FileLoaded(#RunFileLoaded) {
    comment("Place after load file
( App File Loaded )")
    set(#anti_cache,$rand(123,1234),"Global")
    set(#AppLoadedFile,$plugin function("HTTP post.dll", "$http get", "http://app.tracking.mydomain.com/appstats/piwik.php?&idsite=1&rec=1&_id={#session_id}&rand={#anti_cache}&apiv=1&idgoal=4", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0", "http://app.tracking.mydomain.org", "", 20),"Global")
    set(#file_name,$find regular expression(#LoadedFile,"[A-Za-z.0-9_-]+\\.[a-z]+"),"Global")
    set(#LoadFileFail,$plugin function("HTTP post.dll", "$http get", "http://app.tracking.mydomain.com/appstats/piwik.php?&idsite=1&rec=1&_id={#session_id}&rand={#anti_cache}&apiv=1&action_name=File Name = {#file_name}&url=http://app.tracking.org", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0", "http://app.tracking.mydomain.org", "", 20),"Global")
}
define FileLoadFail(#RunFileLoadFail) {
    comment("Place after load file
( App Failed To Load File )")
    set(#anti_cache,$rand(123,1234),"Global")
    set(#LoadFileFail,$plugin function("HTTP post.dll", "$http get", "http://app.tracking.mydomain.com/appstats/piwik.php?&idsite=1&rec=1&_id={#session_id}&rand={#anti_cache}&apiv=1&idgoal=5", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0", "http://app.tracking.mydomain.org", "", 20),"Global")
}

App Button Push    In App Tracking - Button Push

ui open file("Load File",#LoadedFile)
thread {
    if($comparison(#LoadedFile,"!= Does not equal",$nothing)) {
        then {
            FileLoaded(#RunFileLoaded)
        }
        else if($comparison(#LoadedFile,"= Equals",$nothing)) {
            FileLoadFail(#RunFileLoadFail)
        }
    }
}
define FileLoaded(#RunFileLoaded) {
    comment("Place after load file
( App File Loaded )")
    set(#anti_cache,$rand(123,1234),"Global")
    set(#AppLoadedFile,$plugin function("HTTP post.dll", "$http get", "http://app.tracking.mydomain.com/appstats/piwik.php?&idsite=1&rec=1&_id={#session_id}&rand={#anti_cache}&apiv=1&idgoal=4", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0", "http://app.tracking.mydomain.org", "", 20),"Global")
    set(#file_name,$find regular expression(#LoadedFile,"[A-Za-z.0-9_-]+\\.[a-z]+"),"Global")
    set(#LoadFileFail,$plugin function("HTTP post.dll", "$http get", "http://app.tracking.mydomain.com/appstats/piwik.php?&idsite=1&rec=1&_id={#session_id}&rand={#anti_cache}&apiv=1&action_name=File Name = {#file_name}&url=http://app.tracking.org", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0", "http://app.tracking.mydomain.org", "", 20),"Global")
}
define FileLoadFail(#RunFileLoadFail) {
    comment("Place after load file
( App Failed To Load File )")
    set(#anti_cache,$rand(123,1234),"Global")
    set(#LoadFileFail,$plugin function("HTTP post.dll", "$http get", "http://app.tracking.mydomain.com/appstats/piwik.php?&idsite=1&rec=1&_id={#session_id}&rand={#anti_cache}&apiv=1&idgoal=5", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0", "http://app.tracking.mydomain.org", "", 20),"Global")
}

App Check Box    In App Tracking - App Check Box Ticked

ui open file("Load File",#LoadedFile)
thread {
    if($comparison(#LoadedFile,"!= Does not equal",$nothing)) {
        then {
            FileLoaded(#RunFileLoaded)
        }
        else if($comparison(#LoadedFile,"= Equals",$nothing)) {
            FileLoadFail(#RunFileLoadFail)
        }
    }
}
define FileLoaded(#RunFileLoaded) {
    comment("Place after load file
( App File Loaded )")
    set(#anti_cache,$rand(123,1234),"Global")
    set(#AppLoadedFile,$plugin function("HTTP post.dll", "$http get", "http://app.tracking.mydomain.com/appstats/piwik.php?&idsite=1&rec=1&_id={#session_id}&rand={#anti_cache}&apiv=1&idgoal=4", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0", "http://app.tracking.mydomain.org", "", 20),"Global")
    set(#file_name,$find regular expression(#LoadedFile,"[A-Za-z.0-9_-]+\\.[a-z]+"),"Global")
    set(#LoadFileFail,$plugin function("HTTP post.dll", "$http get", "http://app.tracking.mydomain.com/appstats/piwik.php?&idsite=1&rec=1&_id={#session_id}&rand={#anti_cache}&apiv=1&action_name=File Name = {#file_name}&url=http://app.tracking.org", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0", "http://app.tracking.mydomain.org", "", 20),"Global")
}
define FileLoadFail(#RunFileLoadFail) {
    comment("Place after load file
( App Failed To Load File )")
    set(#anti_cache,$rand(123,1234),"Global")
    set(#LoadFileFail,$plugin function("HTTP post.dll", "$http get", "http://app.tracking.mydomain.com/appstats/piwik.php?&idsite=1&rec=1&_id={#session_id}&rand={#anti_cache}&apiv=1&idgoal=5", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0", "http://app.tracking.mydomain.org", "", 20),"Global")
}

App UI Window    In App Tracking - UI Window Opened

ui open file("Load File",#LoadedFile)
thread {
    if($comparison(#LoadedFile,"!= Does not equal",$nothing)) {
        then {
            FileLoaded(#RunFileLoaded)
        }
        else if($comparison(#LoadedFile,"= Equals",$nothing)) {
            FileLoadFail(#RunFileLoadFail)
        }
    }
}
define FileLoaded(#RunFileLoaded) {
    comment("Place after load file
( App File Loaded )")
    set(#anti_cache,$rand(123,1234),"Global")
    set(#AppLoadedFile,$plugin function("HTTP post.dll", "$http get", "http://app.tracking.mydomain.com/appstats/piwik.php?&idsite=1&rec=1&_id={#session_id}&rand={#anti_cache}&apiv=1&idgoal=4", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0", "http://app.tracking.mydomain.org", "", 20),"Global")
    set(#file_name,$find regular expression(#LoadedFile,"[A-Za-z.0-9_-]+\\.[a-z]+"),"Global")
    set(#LoadFileFail,$plugin function("HTTP post.dll", "$http get", "http://app.tracking.mydomain.com/appstats/piwik.php?&idsite=1&rec=1&_id={#session_id}&rand={#anti_cache}&apiv=1&action_name=File Name = {#file_name}&url=http://app.tracking.org", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0", "http://app.tracking.mydomain.org", "", 20),"Global")
}
define FileLoadFail(#RunFileLoadFail) {
    comment("Place after load file
( App Failed To Load File )")
    set(#anti_cache,$rand(123,1234),"Global")
    set(#LoadFileFail,$plugin function("HTTP post.dll", "$http get", "http://app.tracking.mydomain.com/appstats/piwik.php?&idsite=1&rec=1&_id={#session_id}&rand={#anti_cache}&apiv=1&idgoal=5", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0", "http://app.tracking.mydomain.org", "", 20),"Global")
}

App Dropdown    In App Tracking - App Dropdown Value

ui open file("Load File",#LoadedFile)
thread {
    if($comparison(#LoadedFile,"!= Does not equal",$nothing)) {
        then {
            FileLoaded(#RunFileLoaded)
        }
        else if($comparison(#LoadedFile,"= Equals",$nothing)) {
            FileLoadFail(#RunFileLoadFail)
        }
    }
}
define FileLoaded(#RunFileLoaded) {
    comment("Place after load file
( App File Loaded )")
    set(#anti_cache,$rand(123,1234),"Global")
    set(#AppLoadedFile,$plugin function("HTTP post.dll", "$http get", "http://app.tracking.mydomain.com/appstats/piwik.php?&idsite=1&rec=1&_id={#session_id}&rand={#anti_cache}&apiv=1&idgoal=4", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0", "http://app.tracking.mydomain.org", "", 20),"Global")
    set(#file_name,$find regular expression(#LoadedFile,"[A-Za-z.0-9_-]+\\.[a-z]+"),"Global")
    set(#LoadFileFail,$plugin function("HTTP post.dll", "$http get", "http://app.tracking.mydomain.com/appstats/piwik.php?&idsite=1&rec=1&_id={#session_id}&rand={#anti_cache}&apiv=1&action_name=File Name = {#file_name}&url=http://app.tracking.org", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0", "http://app.tracking.mydomain.org", "", 20),"Global")
}
define FileLoadFail(#RunFileLoadFail) {
    comment("Place after load file
( App Failed To Load File )")
    set(#anti_cache,$rand(123,1234),"Global")
    set(#LoadFileFail,$plugin function("HTTP post.dll", "$http get", "http://app.tracking.mydomain.com/appstats/piwik.php?&idsite=1&rec=1&_id={#session_id}&rand={#anti_cache}&apiv=1&idgoal=5", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0", "http://app.tracking.mydomain.org", "", 20),"Global")
}

App List Box    In App Tracking - App List Box Value

ui open file("Load File",#LoadedFile)
thread {
    if($comparison(#LoadedFile,"!= Does not equal",$nothing)) {
        then {
            FileLoaded(#RunFileLoaded)
        }
        else if($comparison(#LoadedFile,"= Equals",$nothing)) {
            FileLoadFail(#RunFileLoadFail)
        }
    }
}
define FileLoaded(#RunFileLoaded) {
    comment("Place after load file
( App File Loaded )")
    set(#anti_cache,$rand(123,1234),"Global")
    set(#AppLoadedFile,$plugin function("HTTP post.dll", "$http get", "http://app.tracking.mydomain.com/appstats/piwik.php?&idsite=1&rec=1&_id={#session_id}&rand={#anti_cache}&apiv=1&idgoal=4", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0", "http://app.tracking.mydomain.org", "", 20),"Global")
    set(#file_name,$find regular expression(#LoadedFile,"[A-Za-z.0-9_-]+\\.[a-z]+"),"Global")
    set(#LoadFileFail,$plugin function("HTTP post.dll", "$http get", "http://app.tracking.mydomain.com/appstats/piwik.php?&idsite=1&rec=1&_id={#session_id}&rand={#anti_cache}&apiv=1&action_name=File Name = {#file_name}&url=http://app.tracking.org", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0", "http://app.tracking.mydomain.org", "", 20),"Global")
}
define FileLoadFail(#RunFileLoadFail) {
    comment("Place after load file
( App Failed To Load File )")
    set(#anti_cache,$rand(123,1234),"Global")
    set(#LoadFileFail,$plugin function("HTTP post.dll", "$http get", "http://app.tracking.mydomain.com/appstats/piwik.php?&idsite=1&rec=1&_id={#session_id}&rand={#anti_cache}&apiv=1&idgoal=5", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0", "http://app.tracking.mydomain.org", "", 20),"Global")
}

App Block Text    In App Tracking - App Block Text Value

ui open file("Load File",#LoadedFile)
thread {
    if($comparison(#LoadedFile,"!= Does not equal",$nothing)) {
        then {
            FileLoaded(#RunFileLoaded)
        }
        else if($comparison(#LoadedFile,"= Equals",$nothing)) {
            FileLoadFail(#RunFileLoadFail)
        }
    }
}
define FileLoaded(#RunFileLoaded) {
    comment("Place after load file
( App File Loaded )")
    set(#anti_cache,$rand(123,1234),"Global")
    set(#AppLoadedFile,$plugin function("HTTP post.dll", "$http get", "http://app.tracking.mydomain.com/appstats/piwik.php?&idsite=1&rec=1&_id={#session_id}&rand={#anti_cache}&apiv=1&idgoal=4", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0", "http://app.tracking.mydomain.org", "", 20),"Global")
    set(#file_name,$find regular expression(#LoadedFile,"[A-Za-z.0-9_-]+\\.[a-z]+"),"Global")
    set(#LoadFileFail,$plugin function("HTTP post.dll", "$http get", "http://app.tracking.mydomain.com/appstats/piwik.php?&idsite=1&rec=1&_id={#session_id}&rand={#anti_cache}&apiv=1&action_name=File Name = {#file_name}&url=http://app.tracking.org", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0", "http://app.tracking.mydomain.org", "", 20),"Global")
}
define FileLoadFail(#RunFileLoadFail) {
    comment("Place after load file
( App Failed To Load File )")
    set(#anti_cache,$rand(123,1234),"Global")
    set(#LoadFileFail,$plugin function("HTTP post.dll", "$http get", "http://app.tracking.mydomain.com/appstats/piwik.php?&idsite=1&rec=1&_id={#session_id}&rand={#anti_cache}&apiv=1&idgoal=5", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0", "http://app.tracking.mydomain.org", "", 20),"Global")
}

App Stat Monitor    In App Tracking - App Stat Monitor Value

ui open file("Load File",#LoadedFile)
thread {
    if($comparison(#LoadedFile,"!= Does not equal",$nothing)) {
        then {
            FileLoaded(#RunFileLoaded)
        }
        else if($comparison(#LoadedFile,"= Equals",$nothing)) {
            FileLoadFail(#RunFileLoadFail)
        }
    }
}
define FileLoaded(#RunFileLoaded) {
    comment("Place after load file
( App File Loaded )")
    set(#anti_cache,$rand(123,1234),"Global")
    set(#AppLoadedFile,$plugin function("HTTP post.dll", "$http get", "http://app.tracking.mydomain.com/appstats/piwik.php?&idsite=1&rec=1&_id={#session_id}&rand={#anti_cache}&apiv=1&idgoal=4", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0", "http://app.tracking.mydomain.org", "", 20),"Global")
    set(#file_name,$find regular expression(#LoadedFile,"[A-Za-z.0-9_-]+\\.[a-z]+"),"Global")
    set(#LoadFileFail,$plugin function("HTTP post.dll", "$http get", "http://app.tracking.mydomain.com/appstats/piwik.php?&idsite=1&rec=1&_id={#session_id}&rand={#anti_cache}&apiv=1&action_name=File Name = {#file_name}&url=http://app.tracking.org", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0", "http://app.tracking.mydomain.org", "", 20),"Global")
}
define FileLoadFail(#RunFileLoadFail) {
    comment("Place after load file
( App Failed To Load File )")
    set(#anti_cache,$rand(123,1234),"Global")
    set(#LoadFileFail,$plugin function("HTTP post.dll", "$http get", "http://app.tracking.mydomain.com/appstats/piwik.php?&idsite=1&rec=1&_id={#session_id}&rand={#anti_cache}&apiv=1&idgoal=5", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0", "http://app.tracking.mydomain.org", "", 20),"Global")
}

App List Total    In App Tracking - App List Total Value

ui open file("Load File",#LoadedFile)
thread {
    if($comparison(#LoadedFile,"!= Does not equal",$nothing)) {
        then {
            FileLoaded(#RunFileLoaded)
        }
        else if($comparison(#LoadedFile,"= Equals",$nothing)) {
            FileLoadFail(#RunFileLoadFail)
        }
    }
}
define FileLoaded(#RunFileLoaded) {
    comment("Place after load file
( App File Loaded )")
    set(#anti_cache,$rand(123,1234),"Global")
    set(#AppLoadedFile,$plugin function("HTTP post.dll", "$http get", "http://app.tracking.mydomain.com/appstats/piwik.php?&idsite=1&rec=1&_id={#session_id}&rand={#anti_cache}&apiv=1&idgoal=4", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0", "http://app.tracking.mydomain.org", "", 20),"Global")
    set(#file_name,$find regular expression(#LoadedFile,"[A-Za-z.0-9_-]+\\.[a-z]+"),"Global")
    set(#LoadFileFail,$plugin function("HTTP post.dll", "$http get", "http://app.tracking.mydomain.com/appstats/piwik.php?&idsite=1&rec=1&_id={#session_id}&rand={#anti_cache}&apiv=1&action_name=File Name = {#file_name}&url=http://app.tracking.org", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0", "http://app.tracking.mydomain.org", "", 20),"Global")
}
define FileLoadFail(#RunFileLoadFail) {
    comment("Place after load file
( App Failed To Load File )")
    set(#anti_cache,$rand(123,1234),"Global")
    set(#LoadFileFail,$plugin function("HTTP post.dll", "$http get", "http://app.tracking.mydomain.com/appstats/piwik.php?&idsite=1&rec=1&_id={#session_id}&rand={#anti_cache}&apiv=1&idgoal=5", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0", "http://app.tracking.mydomain.org", "", 20),"Global")
}

App Table Values    In App Tracking - Rows And Columns

ui open file("Load File",#LoadedFile)
thread {
    if($comparison(#LoadedFile,"!= Does not equal",$nothing)) {
        then {
            FileLoaded(#RunFileLoaded)
        }
        else if($comparison(#LoadedFile,"= Equals",$nothing)) {
            FileLoadFail(#RunFileLoadFail)
        }
    }
}
define FileLoaded(#RunFileLoaded) {
    comment("Place after load file
( App File Loaded )")
    set(#anti_cache,$rand(123,1234),"Global")
    set(#AppLoadedFile,$plugin function("HTTP post.dll", "$http get", "http://app.tracking.mydomain.com/appstats/piwik.php?&idsite=1&rec=1&_id={#session_id}&rand={#anti_cache}&apiv=1&idgoal=4", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0", "http://app.tracking.mydomain.org", "", 20),"Global")
    set(#file_name,$find regular expression(#LoadedFile,"[A-Za-z.0-9_-]+\\.[a-z]+"),"Global")
    set(#LoadFileFail,$plugin function("HTTP post.dll", "$http get", "http://app.tracking.mydomain.com/appstats/piwik.php?&idsite=1&rec=1&_id={#session_id}&rand={#anti_cache}&apiv=1&action_name=File Name = {#file_name}&url=http://app.tracking.org", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0", "http://app.tracking.mydomain.org", "", 20),"Global")
}
define FileLoadFail(#RunFileLoadFail) {
    comment("Place after load file
( App Failed To Load File )")
    set(#anti_cache,$rand(123,1234),"Global")
    set(#LoadFileFail,$plugin function("HTTP post.dll", "$http get", "http://app.tracking.mydomain.com/appstats/piwik.php?&idsite=1&rec=1&_id={#session_id}&rand={#anti_cache}&apiv=1&idgoal=5", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0", "http://app.tracking.mydomain.org", "", 20),"Global")
}

Source Code: http://www.mediafire.com/file/ev53nyt2tmccogw/HTTP%20Api%20App%20Traking%20-%20Reversion%20Build%201.02.ubot

  • Like 5
Link to post
Share on other sites

Thanks TJ, glad you like it. This is really great for catching errors before your clients even have a change to report them.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...