Documents

Overview


AdGyde is a real-time mobile measurement tool that help advertisers in optimizing the ad campaigns and drive the best value for the advertising spend.

Its real-time attribution tracking and analytics solution helps the advertisers/app marketers/growth hackers, product managers in measuring the attributed mobile app installs being acquired through both Non-Organic and Organic channels with features such as Deep Linking, Fraud Installs Detection, Retention, Session Tracking, User Flow and many more through a simple and easy to integrate SDK.

Attribution
AdGyde through its attribution SDK can determine which channel / partner the app install was delivered through. Post install events, User Flow and how the application is being used is shown by AdGyde. This data can help advertiser / Application owner to specifically target user segments, find out best channel to improve upon ROI.

To get started contact AdGyde support - support@adgyde.com

To start integration, Please check "AdGyde Integration Process" or "Integrate Unity SDK" sections.

AdGyde Integration Process


1. Get your App Key
Sign-in to your AdGyde Console, the credentials would have already been provided by AdGyde support team. In case you have not yet received the same, please contact the AdGyde Support Team.

Please follow the given steps :-
Step 1 - Visit the AdGyde Website - https://www.adgyde.com
Step 2 - Go to console
Step 3 - Sign-in with your credentials
Step 4 - Go to Setup -> Applications from the menu option
Step 5 - Click on "Create an application" option on Top Right corner
Step 6 - Fill in the Application Name and Package Name
Step 7 - Note down the App Key for integration reference

2. Download Android SDK
Please download the SDK from "Download Android SDK" link in top right corner of AdGyde Console.



Integrate the downloaded SDK using the below steps


3. Integrate SDK into project

3.1 Add library files into your project
  • Unzip AdGyde Android SDK
  • Add ADGYDE_ANDROID_SDK *.aar file to your android project

3.2 Follow below steps to import .aar file into your projects
  • Go to File>New>New Module
  • Select "Import .JAR/.AAR Package" and click next.
  • Enter the path to .aar file and click finish.
  • Go to File>Project Structure (Ctrl + Shift + Alt + S).
  • Under "Modules," in left menu, select "app."
  • Go to "Dependencies tab.
  • Click the green "+" in the upper right corner.
  • Select "Module Dependency"
  • Select the ADGYDE_ANDROID_SDK .AAR file from the list.

3.3 Initializing PAgent
Android SDK needs to be initialized in the application. Please check Example project on Android SDK for complete code.

package com.adgyde.example;

import android.app.Application;
import android.util.Log;
import com.adgyde.android.PAgent;

public class ExampleApplication extends Application implements
Constants {
@Override

public void onCreate() {
super.onCreate();

Log.d(TAG, "ExampleApplication.onCreate()");
PAgent.init(this, "Your Appkey", "Organic"); // Default channel is Organic
PAgent.flush();

PAgent.setDebugEnabled(true);
}
}

Please don't initialize the AdGyde SDK on Main Activity, this will result in incorrect session data.

Request you to create a separate application class or use any application class already present in your project. For New application class - create ExampleApplication.java, and add the details under application tag in AndroidManifest.xml.

<application android:allowBackup="true" android:icon="@mipmap/ic_launcher"
android:label="@string/app_name" android:supportsRtl="true"
android:theme="@style/AppTheme"
android:name= "com.adgyde.example.ExampleApplication">

<!- application configuration items -->

</application>

Value of android:name parameter should be full name of the newly created application class as shown in the above code snippet

3.4 Pass IMEI to AdGyde
Android SDK needs to be given permission to pickup IMEI with below code, AdGyde SDK doesn't pickup IMEI without App developer consent.

PAgent.allowPermissionIMEI(context , true);

Along with above permisison make sure applictaion itself has the permission to pick up IMEI. Add Phone state permission in your applications manifest.xml file
<uses-permission android:name="android.permission.READ_PHONE_STATE" />


Please check Example project on Android SDK for complete code.

package com.adgyde.example;

import android.app.Application;
import android.util.Log;
import com.adgyde.android.PAgent;

public class ExampleApplication extends Application implements
Constants {
@Override

public void onCreate() {
super.onCreate();

Log.d(TAG, "ExampleApplication.onCreate()");
PAgent.allowPermissionIMEI(this, true);
PAgent.init(this, "Your Appkey", "Organic"); // Default channel is Organic
PAgent.flush();

PAgent.setDebugEnabled(true);
}
}

3.5 Embed Google Play Services into Your App
Install the Google Play Services SDK and import it into your project. For download details, Click here.
Add the below code / entry to the AndroidManifest.xml as the last entry in the application tag (Just before </application>)

<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"/>

NOTE:
AdGyde recommends to always use the latest version of google play service.

For more details see the link below.
https://developer.android.com/google/play-services/setup.html

Please refer below code

< application
android:name=".ExampleApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">

<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />


<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" \>
</intent-filter>
</activity>

<service android:name="com.adgyde.android.AppJobService"android:exported="true"
android:permission="android.permission.BIND_JOB_SERVICE">
</service>


3.6 Add Install receiver code in the androidmanifest.xml

Note:
Please make sure that following receiver tag is kept inside application tag.

<receiver android:name="com.adgyde.android.InstallReceiver" android:exported="true">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>

If an application uses multiple INSTALL_REFERRER receivers, you should use com.adgyde.android.MultiInstallReceiver instead of com.adgyde.android.InstallReceiver.
MultiInstallReceiver MUST be the first receiver on Top of all the other INSTALL_REFERRER receivers

<receiver android:name="com.adgyde.android.MultiInstallReceiver" android:exported="true">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>

If you want to use multiple receivers, then the Manifest.xml file should look like this:

<!--The AdGyde Install Receiver should be placed first and it will broadcast to all receivers placed below it -->

<receiver android:name="com.adgyde.android.MultiInstallReceiver" android:exported="true">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>

<!--All other receivers should be followed right after -->
<receiver android:name="com.google.android.abc.AbcReceiver" android:exported="true">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>

<receiver android:name="com.adsmobi.android.xyz.InstallReceiver" android:exported="true">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>


3.7 Add permissions to project
Add following permissions to AndroidManifest.xml

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE">
</usespermission>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.INTERNET">
</uses-permission>


3.8 Add dependency to project
Add the following dependency to Android gradle file (Module : android).

dependencies {
// . . .
compile 'com.android.installreferrer:installreferrer:1.0'
// . . .
}


4. Deep Linking
Deep linking is the act of launching a mobile app while serving personalized content or sending the users to specific activities within the application.

Deep Linking Detailed Integration Process


5. Uninstall Tracking
AdGyde's Uninstall Tracking functionality allows you to track the number of uninstalls for a specified application. Uninstalls is an important index which helps you to track the quality of users and hence the campaign.

Un-Install Detailed Integration Process

6. Demography
AdGyde demography data provides details of Age and Gender wise segregation of User, this can be used by Advertiser to target the new users and run their campaigns effectively. Campaigns can be run, keeping in mind that the application is say - majorly used by Females and 26-35 Age group, so Advertiser can ask a publisher to target only these groups and get maximum installs and return on the cost spent.

6.1 For Age Profile
The user age profile demography shows the advertiser the user segregation and user concentration on specific age segments. Having this data assists app marketer to take more accurate measurements and helps in decision making.

Data can be passed to SDK by following 2 functions
  1. PAgent.setAge(Context context, int years, int month, int day);
  2. PAgent.setAge(Context context, int age);

// Age to be calculated from Year, Month, Day
PAgent.setAge(context, 1991, 05, 03);

// Age Value
PAgent.setAge(context, 32);





6.2 For Gender Profile
The User gender profile demography shows the advertiser the user segregation and user concentration on specific Gender segments. Having this data, assists app marketer to take more accurate measurements and helps in decision making.

Syntax : PAgent.setGender(Context context , String gender);

Values which are permitted in Function
  1. Male (M)
  2. Female (F)
  3. Others (O)

// when you pass string for Male
PAgent.setGender(context,PAgent.M);

// when you pass string for Female
PAgent.setGender(context,PAgent.F);

// when you pass string for Others
PAgent.setGender(context,PAgent.O);




User Details


New Users
AdGyde lets you know, how many users installed your application through various campaigns in real time. Through this feature you are able to compare the performance of your campaigns and analyse the traffic for your applications.

Organic v/s Non-organic Downloads
AdGyde provides segregated data for Organic and Non-Organic downloads
Organic App download: An organic download is a type of download wherein the user has reached to your application on Play Store searching through keywords provide by you.
Non-organic app download: An non-organic install is one where the user has come to your app download page for a reason, they may have been recommended by a friend or they have seen some form of promotion of your app. Somebody has directed the user to your application

Active Users
AdGyde tells you the number of users which have opened the application at least once on a given day and this number is shown in real time.

Phone Brands and Models
AdGyde provides a comprehensive list of phone brands and models on which your application was installed so that you may target your potential users.

Geo Location
AdGyde provides the number of new users state wise so that you can target your campaign where there is more potential.

Session
1. Overview
Android application is a set of Activities and the relationship between application and activities is loose. One of the most common case issues is that the application won't quit after the BACK key is pressed this makes the developers & user confused. AdGyde redefined session to makes it easy to understand.

2. Definition of session
A session is a conversation between mobile application and user. A session starts with application start and it ends after the user has quit the application. In users perspective, pressing BACK key on main activity or click on quit button on the application will initiate application quit, but instead these tasks switch the application to background which is quite hard to understand.

Normally developer use finish() to quit application by code.
public class MainActivity extends Activity {
protected onCreate(Context context) {
// some code
Button quitButton = (Button)findViewById(R.id.quitAppButton);
quitButton.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// quit application by close main activity
MainActivity.this.finish();
}
});
}
}

MainActivity.this.finish() will close the main activity but won't quit the application, this just puts the application to background. In understanding the MainActivity should be created when user starts the application again, but as application is already in background it just switches background to foreground.

AdGyde redefines quitting of the application - As soon as the user closes the last activity the session is closed. It is exactly in accordance with the user experience with the application. Pressing BACK key on last activity will be considered as the user wants to quit the application.

3. Scenarios of session
3.1 End with BACK key
  1. User starts application, session begins
  2. Main activity is created
  3. User presses BACK key
  4. Main activity is destroyed
  5. Session ends

3.2 Exit by code
  1. User starts application, session begins
  2. Main activity is created
  3. User click on 'quit' button of main activity
  4. Main activity is destroyed
  5. Session ends

3.3 Switch to background
  1. User starts application, session begins
  2. Main activity is created
  3. User presses HOME key to go to home screen
  4. User click application icon after 45 seconds
  5. Application is brought to front, session is closed, new session begins

Session will be closed if the application was switched to background for more than 30 seconds, as it is assumed that the user switched to another task / application and the application in context is not in use.

3.4 Killed by system task manager
  1. User starts application, session begins
  2. User presses the HOME key to open system task manager
  3. User kills application with system task manager. Session ends


3.5 Killed by system
  1. User starts application, Session starts
  2. User switches to another application
  3. Application is running in background, application gets killed by system for low memory. Session ends


Returning Users
1. Overview
Returning back to the application is an index to measure user loyalty.

For applications - Weekly returning rate to measure application performance would be the expected criteria. E.g. For an online bookshop, we expect user should open application at least once weekly. If online bookshop got 100 new users today, and 60 users open the application at least once in this week, then weekly returning rate is 60%. It can be considered good for an online bookshop.

For games - The returning rate of +1 day should be more important than weekly returning rate. This is because the developer expects the user should be attracted to their game and should play the game day and night. If the user doesn’t play the game the next day, this signifies that user has not like the game and the user could be lost.

2. Definition of returning
In Below Depiction +n specifies number of days since Install. Assuming the number of New Users on Apr 1, 2016 was 100. +1 would mean Apr 2, 2016 and Users on +1 mean that How many users who installed application on Day 0 (Apr 1, 2016) have again returned on / opened the application on +1 (Apr 2, 2016). Similarly, +2 means Apr 3, 2016 and users on +2 mean that How many users who installed application on Day 0 (Apr 1, 2016) have again returned on / opened the application on +2 (Apr 3, 2016).

  Date Count of Active Users
(Out of New Users of 1st Apr)
Count of returning users
  Apr 1, 2016 100 (New Users)  
+1 Apr 2, 2016 5 =5
+2 Apr 3, 2016 10 =distinct(5, 10)
+3 Apr 4, 2016 15 =distinct(5, 10, 15)
+4 Apr 5, 2016 20 =distinct(5, 10, 15, 20)
+5 Apr 6, 2016 25 =distinct(5, 10, 15, 20, 25)
+6 Apr 7, 2016 30 =distinct(5, 10, 15, 20, 25, 30)
+7 Apr 8, 2016 35 =distinct(5, 10, 15, 20, 25, 30, 35)
+14 Apr 15, 2016 40 =distinct(5, 10, 15, 20, 25, 30, 35, 40)
+30 May 1, 2016 45 =distinct(5, 10, 15, 20, 25, 30, 35, 40, 45)


On Apr 2, 2016, 5 out of 100 new users opened the application, the number of returning users is 5. From Apr 2, 2016 to Apr 3, 2016, total 15 users opened the application, system will remove duplicate users, so number of returning users will be distinct(5, 10).

Note : This data in real life is descending as number of users returning decrease as the days pass.

3. How to read report
Returning User data is NOT processed on real time and can take up to 24 Hours to show in Console.
1. Login to AdGyde console
2. Select Returning Users section from Acquisition heading in left navigation menu

User Flow
'User Flow' allows the Application Developer to gauge the movement of its users through the activities defined in the application. By analysing the user flow Sankey diagram the App developer can predict which activity is most popular among its users and where the drop-off rates are high.

Suppose for a Food Delivery Application the user flow is expected to be as below:
  1. User selects Restaurant
  2. User selects Cuisine
  3. Add to basket
  4. Payment Completed
Below user flow explains such behaviour where users move from one activity to another.



User can even know the number of inflow and outflow of the users with respect to one node. For example, in below image 'Home' node tells the flow from root, category and promotion where blue represents 'inflow' and red represents 'outflow'.




Tracking Installs for Offline Campaign


This section talks about the tracking solutions for following
  1. Preload campaign
  2. Offline campaigns
  3. Out of store downloads / APK downloads

Pre-load Campaigns
To track the campaigns in AdGyde the advertiser needs to integrate the Pre-Load channel in the application itself and then share the APK with the pre-load partner

Offline Campaigns
To track the campaigns in AdGyde the advertiser needs to integrate the offline channel in the application itself and then run the campaign though notification of some store. We can also share a tracking link which help to download the APK.

Campaigns can be created in AdGyde with partners allowing the advertiser to track CPI, CPR and CPM type campaigns.

Creating the Offline Tracking Links
1. Integrated Partners Tracking Links
  1. Login to the AdGyde Console
  2. Click on setup
  3. Go to the Campaign Tracking.
  4. Click on '+New Campaign'
  5. Enter the Name of the campaign and select the range of click attribution look back window
  6. Click on Create button



  7. Click on '+' Button under channel and choose the partner you want work with in channel name
  8. Click on the offline check box for offline campaigning (As circled on below image)
  9. Copy the Tracking link



  10. Create an APK with the following things configured
    • In PAgent.init(), for the channel name parameter, provide the name of the partner as it is shown in the AdGyde Console and end the string with '_offline' . (For example: if channel name is Loopback then keep the parameter name as Loopback_offline)
    • Then create a downloadable link for the APK, replace the value of the macro ag_r in the tracking link (Which was copied from the Console) with the link of the APK (Make sure APK file is getting downloaded from this link).
  11. The created link is now ready to be shared with your partner for running the campaign.


Offline Campaign Install Test
  1. Please start testing using a fresh device on which the application was never installed before, or use a whitelisted device.
  2. Make sure that int application APK you are installing has the AdGyde SDK integrated
  3. Launch the application after install and use for few seconds
  4. AdGyde dashboard should now show the installation conversion under ‘non-organic’ on the Console.

Note: The name of the partner / Channel set in PAgent.init(this, "app-Key", "channel_offline") should be exactly as the name is entered during channel creation in AdGyde Console.

package com.adgyde.example;

import android.app.Application;
import android.util.Log;

import com.adgyde.android.PAgent;

public class ExampleApplication extends Application implements Constants {
@Override
public void onCreate() {
super.onCreate();
Log.d(TAG, "ExampleApplication.onCreate()");
// Initialize AdGyde SDK with appkey & default channel id.
// SDK will use default channel id if no INSTALL_REFERRER being sent by Google Play Service.
// This case only will happen in debug. (Install APK to phone with adb.)
PAgent.init(this, "app-key", "channel_offline");
PAgent.setDebugEnabled(true);
}
}

Tracking Installs for Online Campaign


AdGyde Attribution and Analytics solution has integrated ad partners for mobile advertising channels; you can also attribute app installs driven by your campaigns.

AdGyde supports
  • CPI (Cost per Impression)
  • CPC (Cost per Clicks),
  • CPR (Cost per Registration),
  • CPA (Cost per Acquisition)

Measuring campaigns in your Attribution Analytics account requires two things:
  • Add an internal partner to associate your campaigns to

    Note: Partners which are already integrated with AdGyde are called Integrate Partners. In case your partner is not found in Integrated partners, Please request partner to initiate integration by filling the Partner Integration Form https://www.adgyde.com/partners.php or ask them to contact us at support@adgyde.com

  • Generate a measurement URL


Online Campaign Flow





Adding a Campaign for an Internal Partner
To generate a measurement URL to use in your marketing campaign, you need to create a "Campaign" after filling in the campaign details

Add New Campaign
  1. Login to the AdGyde console
  2. Click on Setup
  3. Go to the Campaign Menu and Click on “+New Campaign” to start adding the new campaign
  4. Enter the Name of campaign and select the range of click attribution look back window
  5. Click on Create button



Campaign Tracking Details
  1. Click on “+” button under channel and choose the partner you want to work with in channel name
  2. Set the cost for per non-organic download (Cost per install) for the specific partner
  3. The created link; is now ready to be shared with your partner for running the ccampaign.



  4. If required the S2S Events (In-app Events like Registration and Play) can be setup for campaigns like ‘click-per-registration’, ‘click-per-play’
  5. Add partner event Tag in the console which will be corresponding to the Event name (this partner event tag will be provided by your partner)
  6. Click on Update Button

After the campaign is live, the resulting app installs driven through this campaign can be viewed in the Attribution Analytics Report under campaign performance.
  1. New Users per Channel
  2. Valuable users per channel
  3. Cost per Channel
  4. Clicks per installs per channel
  5. Revenue generated per channel
  6. Deferred Deep Link count per Channel
  7. Deep Link count per Channel
  8. Re-Attribution per Channel



Deep Linking


Deep linking is the act of launching a mobile app while serving personalized content or sending the users to specific activities within the application.

1. How Deep Link works
When User click on the Campaign link and If the app is installed the deep linking will be used to open the app and direct the user to a specific page. If the application is not installed, then the campaign runs as normal and a user can install the application

Below pictures shows the deep link scenario.



2. Deep linking integration steps
To allow user to enable the deep linking. we provide the user interface in the AdGyde Console. Using following steps user can enable deep linking.

  1. Login in to AdGyde Console
  2. Click on setup option
  3. Click on Deep Linking
  4. Click on +Create New Scheme for deep linking of application
  5. Select your Application from dropdown, set scheme name, enter scheme name which is passed in AndroidManifest.xml, Set host name and Path
  6. Click on Create Scheme.



    E. g. If you want to deep link following Link - https://www.adgyde.com/demo
    • Scheme : https. At least one scheme attribute must be set for the Intent filter
    • Host : www.adgdye.com
    • Path : /demo, identifying the specific resource (path start with “/”)

    E. g. If you want to deep link following Link - adgyde://demo/registration
    • Scheme : adgyde
    • Host : demo
    • Path : /registration

    With this scheme and details you can get your custom scheme setup and use same


  7. Now enable deep link for campaign. Click on setup option
  8. Click on Campaign Tracking
  9. Click on +New campaign for create new campaign which is used for enabling the deep linking
  10. After creating new campaign click on Plus (+) Button
  11. Click on Enable deep linking
  12. Select deep link scheme from drop down
  13. Enter Application Class Name (Activity Name), where you want to go after deep link
  14. Enter Data URL for when campaign click on Desktop browser then data URL content is open
  15. Copy the auto generated intent-filter and paste into the your AndroidManifest.xml
  16. Click on Update Button to update your campaign with deep linking.



Events


Event is a powerful tool to track interaction between user and mobile application.
There are 3 kinds of events, which are
  1. Simple Event
  2. Counting Event
  3. Computing Event

1. Simple Event
Simple event is an event without parameters. It can be used to track simple event. For example, if you need to track how many times which user launch your application. Just put a line at onCreate() of main activity.

public void onCreate() {
// some code here
// fire simple event named "Launch my application"
PAgent.onEvent("Launch my application");
PAgent.flush();
}

Simple event can be used to construct funnel, the details for same can be found under funnel section.

For more complicated event tracking - Counting Event or Computing Event should be considered.

2. Counting Event
Counting Event is useful to track event which needs counting. For example, if we are developing a news application. This application has three categories, which are local news, national news and international news. We need to know which category is the most popular, just implement the following code on click listener.

/**
* Being triggered if "Local News" tab clicked.
*/
public void onCategoryLocalNewsClicked(View view) {
// your code here
Map<String, String> params = new HashMap<String, String>();
params.put("category", "local news");
PAgent.onEvent("selected category", params);
PAgent.flush();
}

/**
* Being triggered if "National News" tab clicked.
*/
public void onCategoryNationalNewsClicked(View view) {
// your code here
Map<String, String> params = new HashMap<String, String>();
params.put("category", "national news");
PAgent.onEvent("selected category", params);
PAgent.flush();
}

/**
* Being triggered if "International News" tab clicked.
*/
public void onCategoryInternationalNewsClicked(View view) {
// your code here
Map<String, String> params = new HashMap<String, String>();
params.put("category", "international news");
PAgent.onEvent("selected category", params);
PAgent.flush();
}

As the events are different and AdGyde Server needs to differentiate that the event is counting event, therefore events need to be added in console with specified type.

Following are the steps to add counting event in Console
  1. Login to AdGyde console
  2. Click on Setup/Events
  3. Click on 'create' button above events list
  4. Select your application on app_name field
  5. Enter 'selected category' on event_id field. It should be the same as first parameter of PAgent.onEvent(String, Map<String, String>)
  6. Enter 'category' on parameter_name field
  7. Select 'Counting' item of comp_param_type field
  8. Click on 'Create' button



Counting Event represents frequency relationship between given parameter values and therefore we have chosen Histogram as these are good to present those relationships.

3. Computing Event
Computing Event can be used to track accumulatative values.

E.g. If we put our banner in application with different Weightage or say Cost, then using the computing event we can know the Contribution of each Banner as per weightage assigned.

/**
* Invoked when advertisement clicked.
*/
public void onAdvertismentClicked(Advertisement adv) {
Map<String, String> params = new HashMap<String, String>();
// First parameter is event name and second is value name which will be accumulated.
params.put("CPM", adv.getName());
// Second parameter is the value for its value name. Value must be integer type.
params.put(adv.getName(), "" + adv.getPrice());
// Trigger event where first parameter is event_id
PAgent.onEvent("CPM income", params);
PAgent.flush();
}

Computing event uses 2 parameters. First parameter defines event id say 'CPM' and parameter which will be accumulated. Second parameter defines parameter value. For example, news application placed 2 banners. First is 'adv1', CPM is 1 cent. Second is 'adv2', CPM is 5 cents. 'adv1' clicked 5 times, 'adv2' clicked 10 times. Accumulated value are 'adv1'=1 cent * 5=5 cents, 'adv2'=5 cents * 10=50 cents.

The process of defining the computing event is similar to counting event, but com_param_type should be set to 'Computing'.



Computing Event represents contribution percentage of given parameter in an event, therefore Pie chart is the appropriate tool to present this relationship.

4. Revenue Event
There is a separate Revenue event which should and can be used for keeping track of revenue generated through the application. Revenue shown in the console is also based on this event only.

private void fireRevenueEvent() {
PAgent.onRevenue(17);
PAgent.flush();
}

5. Unique Event
Unique Event is useful to track event which needs counting once in a day. For example, if we develop a news application. This application has three categories, which are local news, national news and international news. We need to know which category is the most popular, just put following code on click listener.

As the events are different and AdGyde Server needs to differentiate that the event is unique event, therefore events need to be added in console with specified type.

Please follow instructions below to create unique event
  1. Login into AdGyde Console
  2. Click on Setup/Events
  3. Click on 'create' button above events list
  4. Select your application on app_name field
  5. Enter 'selected category' on event_id field. It should be the same as first parameter of PAgent.onEvent(String, Map, Boolean flag)
  6. Enter 'category' on parameter_name field
  7. Select 'Unique Event' item of comp_param_type field
  8. Click on 'Create' button

Unique Event represents frequency relationship between given parameter values therefore Histogram is used to present those relationships.


Funnel
Funnel is a way to measure the user path as per the user interaction with the application.

1. Define Funnel


Suppose a banner is shown on the home page of a news application. Expectation is users will be attracted to click the banner which will navigate the user to local news. There is a contact link at the bottom of this news. Payment will be based on local news thread, so we expect users to willing click and establish contact through the form.

In practice, 100 users entered home page out of these 40 users click on banner then out of these 40 users only 10 users read news and click contact link. The convert rate is 10%.



Funnel plots the conversion rate in visual form for each step.

2. Code for tracking
Simple events are best suited for funnels. Following example also uses simple events.

/**
* Invoked when user launch my application.
*/
public void onEnterHomePage() {
PAgent.onEvent( "enter home page");
PAgent.flush();
}

/**
* Invoked when user click on home page banner.
*/
public void onBannerClicked() {
PAgent.onEvent( "banner clicked");
PAgent.flush();
}

/**
* Invoked when user click on "contract us" link.
*/
public void onContractUsViewed() {
PAgent.onEvent("contract us");
PAgent.flush();
}


3. Setup funnel
After the coding part is complete, funnel needs to be setup in the console as well.

Please follow the below instructions to setup a funnel
  1. Login to AdGyde console
  2. Click on 'Create' button to create a new funnel
  3. Select application and input funnel name
  4. Click on 'Create' button to save funnel
  5. On funnel list, click on 'click go' of newly created funnel
  6. Add items
Note: Data population in the funnel takes at least 1 Day after the funnel has been created.

Conversion

1. Overview
Conversion is a powerful tool to track user reaction against designed service path. Service path is the process to serve user. For example, we are running an online bookshop. We put a banner on the home page to promote a hot sale novel. We expect user will be attracted by banner, then click on banner to enter product detail page to take a look, then he will like this book and put it to cart. In this case, we can design service path as below.
  1. User is attracted by banner
  2. User goes to product detail page by clicking banner
  3. User puts promoted book to cart

We mark above steps as MyPromoteStep1, MyPromoteStep2 and MyPromoteStep3, and use simple event to trace those events. MyPromoteStep <n> event will be fired if user following service path. if MyPromoteStep1 being fired 100 times, MyPromoteStep2 being fired 50 times, MyPromoteStep3 being fired 10 times, the purchasing conversion is 10 / 100 = 10%. It is good for my online book, I should pay more money to buy traffic to sale more.

2. Define funnel
  1. Login to AdGyde console
  2. Click on Setup/Events
  3. Add 3 simple events named MyPromoteStep1, MyPromoteStep2, MyPromoteStep3
  4. Click on Setup/Event funnel
  5. Create a new funnel
  6. Click on 'click go' of funnel item column
  7. Add funnel item by select event from list. First step is MyPromoteStep1, second step is MyPromoteStep2, third step is MyPromoteStep3

3. Code for tracing
Now we put tracing code into our online bookshop project.

/**
* Invoked when user click on home page banner.
*/
public void onClickOnBanner() {
PAgent.onEvent( "MyPromoteStep1");
PAgent.flush();
}

/**
* Invoked when user enter detail page of promoted novel.
*/
public void onEnterNovelDetailPage() {
PAgent.onEvent("MyPromoteStep2");
PAgent.flush();
}

/**
* Invoked when user put promoted novel to cart.
*/
public void onPutNovelToCart() {
PAgent.onEvent( "MyPromoteStep3");
PAgent.flush();
}


4. Conversion report
Conversion can be seen on next day
  1. Login to AdGyde console
  2. Select query date range on toolbar
  3. Click on Conversion menu
  4. Select funnel name from 'Choose funnel' drop-down
  5. Check funnel chart

Monetisation


1. Monetisation and In-App Revenue
In-app revenue is a type of revenue which is generated by any type of in-app events. The In-app revenue is considered suitable to measure campaign performance.

Suppose the App Developer may create a new in-app purchase event on the purchase screen and creates a deep link to the purchase screen. It then starts a campaign. User clicks on the tracking link for the in-app event and makes a purchase. The App Developer may then measure campaign performance and make suitable payments.

The App Developer generally regards in-app revenue as suitable parameter to measure and evaluate the campaign performance.
  1. The App Developer assigns a revenue event and sets value of Diwali Gift to Rs.50 in code
  2. Implement the deep linking functionlity in your application
  3. login into AdGyde Console
  4. Create a Campaign for this promotion along with Deep Linking and deferred Deep Linking functionality to take the user directly to Purchase screen
  5. When User Has the Application then he is taken to Purchase screen but if user doesn’t have application the Application is installed and then taken to Purchase screen
  6. In console we can see the Revenue generated from this campaign

2. Life Time Value
Capture the worth of the user in terms of revenue and loyalty ,when combined with other metrics like session details and users flow, it can give you useful insights into who your loyal users are and who spends more on your App.

Knowing and identifying these users with higher lifetime value will be the key to survival and you may want to establish the correlation between these users and ad networks, marketing campaigns and key feature set which are sending these users to your app.

This gives you an insight into where you should be spending your marketing dollars and where it is reasonable to pay a higher cost-per-install and optimize your marketing acquisition costs.


Cohort Analysis


AdGyde's Cohort report provides an ability to view and compare different metrics per multiple cohorts over different timeframes. Input filter conditions like date range, version, location and channels can be used to segment user count, also daily / weekly revenue trend as per the valuable users can be viewed on Console.

To compare the user quality per city for a geo based camapaign follow these steps
  1. Login to the AdGyde Console
  2. Select the Application from the list of clients
  3. Select the conditions:
    1. Select date range
    2. Select the campaign name
    3. Keep City Name as All
  4. Select 'city' option to use for group by
  5. Click Query to populate the Data
  6. Console shows cohort report as line chart:
    1. Y axis: Session Count
    2. X axis: Date

Campaign Tracking


As per the definition, campaign tracking refers to method to keep track from where the installs are coming. Campaign tracking helps to analyse new users, returning users, In-app events, In-app revenues generated for the Ad networks and advertisers.

  1. Log in to the AdGyde console.
  2. Select the application.
  3. Creates a new campaign for the publisher.
  4. Selects 'The Publisher' from the integrated partners list.
  5. Enters the campaign name.
  6. Select 'Click Attribution Lookback Window' (1 - 90 days)
  7. Configure in-app events which will be sent to the publisher. Enter the publisher event token as event value.
  8. AdGyde console creates tracking URL as 'http://www.adgyde.com/b/1/r?c=aB1&clickid={clickid}'
  9. Save the campaign and share the tracking URL with the publisher.
  10. The publisher needs to mask the tracking URL with its own tool and makes the link public / starts the campaign
  11. When the user clicks on the masked tracking URL, he is navigated to the publisher's server.
  12. The publisher's server creates an id for this click and replaces the {clickid} in the tracking URL with this id. (This id is defined at publisher's end. For the some publishers it can be {transaction_id}, {clickid} or {subid})
  13. The publisher link redirects user to the tracking URL with a unique click id.
  14. AdGyde captures these details including click id. It uses click id to create referrer install URL to the Google Play Store. Following parameters will be sent to Google Play Store as referrer.
  15. AdGyde redirects user to Google Play Store.
  16. Google Play Store downloads and installs the APK.
  17. Google Play Service sends INSTALL_REFERRER to the application with the first launch of the application..
  18. AdGyde SDK captures the referrer and uploads the logs to server.
  19. AdGyde creates a new user.
  20. User starts to use the application. The application triggers PLAY_GAME event. (The time to trigger event is per application.)
  21. AdGyde server gets the log for PLAY_GAME event
  22. AdGyde server sends the PLAY_GAME event post back to publisher server.

Post-Back URL
An advance feature of AdGyde, post-back URL provides server to server notification for every new user installed and In-App events.

Below is the list of Macros supported in Install post back
MacrosCommentExample
{idfa}Currently will be null as we do not capture any idfa value
{advertisingId}Google Advertising Id of the usere23c04c6-44aa-48fc-9781-xxxxxxxxxxxx
{androidId}Android Id of the application35aa72a37cxxxxxx
{packageName}Package Name of the application. This is available only when the campaign is via the new campaign tracking method i.e via the API /b/1/ucom.adgyde.adgydedemo
{install_time}Macro is returned in Unix Timestamp format1532081296
{click_time}Macro is returned in Unix Timestamp format1532081266
{campaign}Campaign NameTestMacroCampaign
{country_code}Should return country code but we are returning country name in this version as we do not capture country codeIndia
{city}City nameNoida
{device_brand}Brand of the device which triggered the installMotorola
{operator}Operator NameWifi
{ip}Ip Address of the device. Sensitive information and the postback should be made available to the partner after internal discussion182.76.yy.xxx
{device_model}Model of the deviceNexus+6.0
{language}Language of the phoneen
{transaction_id}Unique id sent by AdGyde. This is available only when the campaign is via the new campaign tracking method i.e via the API /b/1/u1532081266741C1wRx
{sdk_ver}AdGyde SDK version1.1.0
{app_ver}Application Version1.9
{os_ver}OS version of the device6.0.1
{appName}Application Name as saved in AdGyde.This is available only when the campaign is via the new campaign tracking method i.e via the API /b/1/uAdGydeDemo
{clickid}Unique Value sent by the partnertestdclick12
{sub1}Custom Macro.This is available only when the campaign is via the new campaign tracking method i.e via the API /b/1/uCutomMacro1
{sub2}Custom Macro.This is available only when the campaign is via the new campaign tracking method i.e via the API /b/1/uCutomMacro2
{sub3}Custom Macro.This is available only when the campaign is via the new campaign tracking method i.e via the API /b/1/uCutomMacro3
{sub4}Custom Macro.This is available only when the campaign is via the new campaign tracking method i.e via the API /b/1/uCutomMacro4


Example Install Postback URL:
http://www.adgyde.com?idfa={idfa}&advertiserId={advertiserId}&android-id={androidId}&app-id={packageName}&install-unix-ts={install_time}&click-ts={click_time}&camapign={camapign}&country-code={country_code}&city={city}&device-brand={device_brand}&carrier={operator}&ip={ip}&device-model={device_model}&language={language}&customclickid={transaction_id}&sdk-version={sdk_ver}&app-version={app_ver}&os-version={os_ver}&app-name={app_name}&clickid={clickid}&sub1={sub1}&sub2={sub2}&sub3={sub3}&sub4={sub4}

In-app events
AdGyde through in-app events allows you to track any post-install event that you are interested in, relating to a media source and campaign.

You can track in-app events, such as:
  • Login
  • Add to cart
  • In-app purchases
  • Or any other logical event

You can also add a in-app revenue value to each event and this is available to you on your AdGyde dashboard. You can map these in-app events to your media source's defined events.

Below is the list of Macros supported in In-App Event post back
macrosCommentExample
{idfa}Currently will be null as we do not capture any idfa value
{advertisingId}Google Advertising Id of the usere23c04c6-44aa-48fc-9781-xxxxxxxxxxxx
{androidId}Android Id of the application35aa72a37cxxxxxx
{packageName}Package Name of the application. This is available only when the campaign is via the new campaign tracking method i.e via the API /b/1/ucom.adgyde.adgydedemo
{country_code}Should return country code but we are returning country name in this version as we do not capture country codeIndia
{city}City nameNoida
{device_brand}Brand of the device which triggered the installMotorola
{operator}Operator NameWifi
{ip}Ip Address of the device. Sensitive information and the postback should be made available to the partner after internal discussion182.76.yy.xxx
{device_model}Model of the deviceNexus+6.0
{language}Language of the phoneen
{transaction_id}Unique id sent by AdGyde. This is available only when the campaign is via the new campaign tracking method i.e via the API /b/1/u1532081266741C1wRx
{sdk_ver}AdGyde SDK version1.1.0
{app_ver}Application Version1.9
{os_ver}OS version of the device6.0.1
{appName}Application Name as saved in AdGyde.This is available only when the campaign is via the new campaign tracking method i.e via the API /b/1/uAdGydeDemo
{eventName}Name of the EventEvent1
{timestamp}TimeStamp of the log received.
{eventid}Value of the event as was saved when attaching the event to the campaign.
{clickid}Unique Value sent by the partnertestdclick12
{sub1}Custom Macro.This is available only when the campaign is via the new campaign tracking method i.e via the API /b/1/uCutomMacro1
{sub2}Custom Macro.This is available only when the campaign is via the new campaign tracking method i.e via the API /b/1/uCutomMacro2
{sub3}Custom Macro.This is available only when the campaign is via the new campaign tracking method i.e via the API /b/1/uCutomMacro3
{sub4}Custom Macro.This is available only when the campaign is via the new campaign tracking method i.e via the API /b/1/uCutomMacro4


In-app Revenue
In-app revenue event is used to track the revenue earned through In-app user interactions. Revenue event is also a in-app event but separated as this converts into revenue for app developer.

Retention Rate
Retention rate feature helps the Application Developer to study the user retention for their application on daily basis. The Application Developer can view the retention rate in different time frames like Daily for 7 Days, Weekly for 4 Weeks and Monthly for 2 Months i.e. New User who can on 1st Sep (Week 35, Month Sep) did they return on 2nd Sep or did they return on Week 36 or Oct Month. Also returning user division on Organic and Non-organic mode of acquiring.

The App Developer uses retention rate to check the quality of new users
  1. Login to the AdGyde Console
  2. Select the Application
  3. Select Date Range, Organic / non-Organic and Channel
  4. 1 day retention rate for the Ad network company can be seen and a decisions can be made based on the information for scaling the campaign of not.


Android Uninstall Tracking


AdGyde's Uninstall Tracking functionlity allows you to track the number of uninstalls for a specified application. Uninstalls is an important index which helps you to track the quality of users and hence the campaign.

1. Requirements
An Android application with AdGyde SDK integrated. Also Firebase Project's Server Key for the same application

Notes:-
  1. Uninstalls tracking is supported from Android SDK version 3.1.0
  2. If you are using multiple InstanceIDListener services, you can create your own Listener and pass the token to AdGyde's API


2 Steps to Enable AdGyde's Uninstall Tracking

2.1. Application Without Firebase Messaging
If your android application is not using Firebase Messaging Service, then follow below instructions:

  • Get your Firebase project's Server Key (Section 3)
  • Enter the Server Key to your AdGyde's dashboard. (Section 4)
  • Configure Firebase Messaging on your app. (Section 5)
  • Add the following code to your application as described:
  • Add the Firebase Dependency to your app's build.gradle file, as the following:

    dependencies {
    // . . .
    implement 'com.google.firebase:firebase-messaging:19.0.1'
    // . . .
    }

  • Add these lines to your app's AndroidManifest.xml file, inside the application tag:

    <application
    <!-- ... -->
    <service android:name="com.adgyde.android.FIIDService" exported="false" >
    <intent-filter>
    <action android:name="com.google.firebase.MESSAGING_EVENT"/>
    </intent-filter>
    </service>
    <!-- ... -->
    </application>

2.2. Application with Firebase Messaging Integrated
If you have Firebase Notifications integrated into your app, then follow these instructions:

  • Obtain your Firebase project's Server Key. (Section 3)
  • Enter the Server Key to your AdGyde dashboard. (Section 4)
  • Add the following code to your application as described:
  • In your InstanceIDListener Service's onTokenRefresh method (a class extending com.google.firebase.iid.FirebaseInstanceIdService), call our API inside the overridden method onTokenRefresh, as in the following example:

public class FIIDService extends FirebaseMessagingService {
private static final String TAG = "FIIDService";
@Override
public void onNewToken(String token) {
super.onNewToken(token);
try {
String refreshedToken = token;
if (!TextUtils.isEmpty(refreshedToken)){
PAgent.onTokenRefresh(refreshedToken);
Log.d(TAG, "onTokenRefresh Refreshed token : " + refreshedToken);
}
} catch(Exception e){
e.printStackTrace();
}
}
}

3. Obtaining the Firebase Server Key
  1. Open the Firebase Console: https://console.firebase.google.com
  2. Create a Firebase Android Application project (if you have not already done so). For more information, visit this link: https://firebase.google.com/docs/cloud-messaging/android/client
  3. Open the Firebase Console: https://console.firebase.google.com
  4. After the project is created, open the project page by selecting the project from all the listed projects
  5. Navigate to the Project Settings (click on the cogwheel next to Overview on the left pane of the page)
  6. Under the Cloud Messaging tab, you can see your Sender ID which you may be using for FCM / GCM) and also two Server Keys as shown below



  7. Make Note of Server Key (The Long Key and not the Legacy Server Key), which will be input in AdGyde's dashboard for uninstall tracking

4. Entering the Server Key on AdGyde's Dashboard
  1. Login to AdGyde Console
  2. Clock on Setup -> Uninstall left navigation menu.

  3. Input the Firebase Server Key, which you had copied / noted in previous section in the area provided


5. Configure Firebase-Messaging on your Application
Follow the below steps as listed, or alternatively visit the firebase integration link by Google
https://firebase.google.com/docs/cloud-messaging/android/client

  1. Download your project's JSON file: google-services.json and saved it under your application's module directory If you do not have this file, you can download it from your Project Settings in the Firebase Console
  2. Add the Firebase-Messaging dependencies to your project. Add rules to your root-level build.gradle file to include the google-services plugin:

    buildscript {
    // ...
    dependencies {
    // ...
    classpath 'com.google.gms:google-services:4.3.0' // ADD THIS LINE HERE
    }
    }

  3. In module Gradle file (usually the app/build.gradle) of the project, add the apply plugin line at the bottom of the file to enable the Gradle plugin, and add also the dependency inside the dependencies block

    apply plugin: 'com.android.app'
    android {
    // ...
    }

    dependencies {
    // ...
    compile 'com.google.firebase:firebase-messaging:19.0.1' // ADD THIS LINE AT THE BOTTOM OF THIS BLOCK
    }

    .
    .
    .

    apply plugin: 'com.google.gms.google-services' // ADD THIS LINE AT THE BOTTOM OF THIS FILE

    In case "Could not find.." error is encountered, make sure you have the latest Google Repository in the Android SDK Manager to resolve the same

6. Using ProGuard with Uninstall Tracking
If your project is using ProGaurd, you need to take care that AdGyde SDK functions and Google Firebase Messaging Service functions do not get obfuscated, for same following rule exceptions need to be added in ProGaurd file

-dontwarncom.adgyde.android.**
-keep public class com.google.firebase.iid.FirebaseInstanceId {
public *;
}


7. Testing Android Uninstall Tracking
Testing of uninstall tracking is quite simple.
Whether the android application is live on Google Play or pending submission or even if out of store, the test will remain the same - just uninstall the app from the device.

It takes up to 24 hours for the new app’s uninstall event to be displayed on the uninstall trends section of the Dashboard.