Integration Process
1. Get the App Key
Sign-in to AdGyde Dashboard, 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 Login
Step 3 - Sign-in with the provided credentials
Step 4 - Go to Setup Page
Step 5 - Select Manage Applications from the Application option on Setup Page
Step 6 - Click on "Create an application" option on Top Right corner
Step 7 - Fill in the Application details
Step 8 - Note down the App Key for integration reference
2. Download Android Sample App Please follow the given steps :-
Step 1 - Visit the AdGyde Website - https://www.adgyde.com/
Step 2 - Go to Login
Step 3 - Sign-in with the provided credentials
Step 4 - Go to Setup Page
Step 5 - Select Manage Applications from the Application option on Setup Page
Step 6 - Click on "Create an application" option on Top Right corner
Step 7 - Fill in the Application details
Step 8 - Note down the App Key for integration reference
To Integrate the SDK in your application use the steps in section 3
Below specified link / steps are for Sample Application ONLY.
Click the Download link hyperlink from the SDK KIT option on your Setup Page of the AdGyde Console.
Link will redirect you to AdGyde SDK Page. From here you can download the Desired Sample Application
3.1 Add library files into the project
3.3 Initializing AdGyde
3.6 Add permissions to project
3.7 Add dependency to project
4. Sessions - Open build.gradle (Project Module) and add below code
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {repositories {
}google()
}
jcenter()
dependencies {classpath 'com.android.tools.build:gradle:3.5.3'
}
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.google.gms:google-services:4.3.5'
allprojects {repositories {
google()
}
jcenter()
} - Open build.gradle (App Module) and add below code
apply plugin: 'com.android.application'
android {compileSdkVersion 29
}
defaultConfig {applicationId "com.adgyde.example"
}
minSdkVersion 21
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
buildTypes {release {
}minifyEnabled false
}
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
dependencies {implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.firebase:firebase-core:18.0.2'
implementation 'com.google.firebase:firebase-messaging:21.0.1'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
testImplementation 'junit:junit:4.13.2'
implementation 'com.android.installreferrer:installreferrer:2.2'
// For adding AdGyde Sdk with AndroidX supportimplementation 'com.adgyde:adgyde-androidx-sdk:4.1.12'
}
apply plugin: 'com.google.gms.google-services'
- Click Sync Now option on top, to sync the project and find the library
- Build your code to check if everything is working fine
3.3 Initializing AdGyde
Android SDK needs to be initialized in the application. Please check Example project on Android SDK for complete code.
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 the project. For New application class - create ExampleApplication.java and add the details under application tag in AndroidManifest.xml.
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 (Works for Android 9 and below) package com.adgyde.example; import android.app.Application; import android.util.Log; import com.adgyde.android.AdGyde; public class ExampleApplication extends Application implements Constants { @Override} |
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 the 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" </application> |
Value of android:name parameter should be full name of the newly created application class as shown in the above code snippet
If the application needs to pass the IMEI and record the same along with other user details, then Android SDK needs to be given permission to pick up IMEI explicitly. Even when application has the permission, AdGyde SDK doesn't pick up IMEI without App developer consent which user needs to pass to the SDK using AdGyde.allowPermissionIMEI(context , true) function
Along with above permission make sure application itself has the permission to pick up IMEI. Add Phone state permission in the applications manifest.xml file
Below is the sample code to initialize Android SDK with App Developer consent to pass IMEI
3.5 Embed Google Play Services into the App Along with above permission make sure application itself has the permission to pick up IMEI. Add Phone state permission in the applications manifest.xml file
<uses-permission android:name="android.permission.READ_PHONE_STATE" /> |
Below is the sample code to initialize Android SDK with App Developer consent to pass IMEI
package com.adgyde.example; import android.app.Application; import android.util.Log; import com.adgyde.android.AdGyde; public class ExampleApplication extends Application implements Constants { @Override} |
Install the Google Play Services SDK and import it into the 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>)
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
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" <meta-data android:name="com.google.android.gms.version" <activity android:name=".MainActivity"> <intent-filter></activity><action android:name="android.intent.action.MAIN" /></intent-filter> <service android:name="com.adgyde.android.AppJobService"android:exported="true" android:permission="android.permission.BIND_JOB_SERVICE"> </service> |
3.6 Add permissions to project
Add following permissions to AndroidManifest.xml
<uses-permission android:name="android.permission.INTERNET"> </uses-permission> |
3.7 Add dependency to project
To allow th application to get the attribution details, the below code is mandatory.
Add the following dependency to Android gradle file (Module : android).
Add the following dependency to Android gradle file (Module : android).
dependencies {} |
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 AdGyde Android SDK, sessions are linked to the android application Life Cycle and so are calculated automatically without any integration.
5. User FlowIn AdGyde Android SDK, sessions are linked to the android application Life Cycle and so are calculated automatically without any integration.
'User Flow' allows the Application Developer to gauge the movement of its users through the activities defined in the application. By analyzing 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.
In AdGyde Android SDK, User Flow is linked to the android application Life Cycle and so is calculated automatically without any integration.
6. Uninstall TrackingIn AdGyde Android SDK, User Flow is linked to the android application Life Cycle and so is calculated automatically without any integration.
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
7. EventsUn-Install detailed integration process
AdGyde's Event Tracking allows an application owner to track the events triggered by users. What user is doing in the application are generally tracked using the events like - Registration, Add to Cart, Payment initiated, Payment.
AdGyde supports multiple types of events, please follow the below link to integrate events in the application
Events detailed integration process
8. Deep LinkingAdGyde supports multiple types of events, please follow the below link to integrate events in the application
Events detailed integration process
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
9. DemographyDeep Linking detailed integration process
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.
Demography detailed integration process
10. Pass additional data to SDKDemography detailed integration process
AdGyde allows to pass additional data like Userid, Email and Phone Number to SDK so that same can be correlated to the AdGyde Data and logs.
- Advertiser's User id
In case Advertiser needs to relate Applications analytics data with its own User Id then advertiser can pass the same explicitly using AdGyde.setClientUserId("ADG1045984") function. Analytical data then can be shared with the install, events etc. Userid wise also.
- Email id
In case Advertiser needs to store and relate Application analytics data with the user's email id then advertiser can pass the same explicitly using AdGyde.setEmail(context, "support@adgyde.com") function. Analytical data then can be shared along with email id
- Phone Number
In case Advertiser needs to store and relate Application analytics data with the user's phone number then advertiser can pass the same explicitly using AdGyde.setPhoneno(context, "919876543210") function. Analytical data then can be shared along with phone number
public void onClick(View view) { } |
Menu 1
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Menu 1
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.