DeepLinking
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 Below pictures shows the deep link scenario.
![](https://www.adgyde.com/source/images/documents/deep_linking_scenario.jpg)
To allow user to enable the deep linking. we provide the user interface in the AdGyde Dashboard. Using following steps user can enable deep linking.
- Login to AdGyde Dashboard
- Open Setup Page from Left Navigation Menu
- Click on Manage DeepLinks under DEEP LINKING
- Click on 'Create New Scheme' button on Top right Corner
- Select your Application from dropdown, set Scheme Name, enter Scheme which is passed in AndroidManifest.xml, Set Host and Path as well
- Click on Create Scheme
E. g. If you want to Deep Link following URL - https://www.adgyde.com/demo to a specific Activity- 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 URL - adgyde://demo/registration- Scheme : adgyde
- Host : demo
- Path : /registration
With this scheme and details you can get your custom scheme setup and use the same - Now to enable Deep link through a campaign.
- Click on Manage Campaigns under Campaign Tracking
- Click on 'Create New Campaign' button on Top right Corner
- Fill in Campaign configurations, Channel Configuration and Setup Event postback
- After these Go to Setup DeepLinking
- Enable Deep Linking / Deferred DeepLinking by click the toggle button
- Select DeepLink scheme from drop down
- Enter Application Class Name (Activity Name), where you want to go after DeepLink
- Enter Data URL which will be passed to the activity
- Create the campaign
- DeepLink code can be copied from Campaign details shown in next page after creation and paste into the your AndroidManifest.xml
- As Cordova has only a single Screen and user themselves implement the multiple screens, therefore deep linking data is not passed to screen instead user can extract data whenever required. To fetch the data for processing at user's discretion use the following function as given below :
function GetDLData() { AdGydeTracker.GetDeeplinkData(success, error);
}
function success(data) {alert(data);
}
function error(error) {alert(JSON.stringify(error));
}
![](https://www.adgyde.com/source/images/documents/deep_linking_manifest.jpg)