SDK Testing and Validation

Once you have implemented the Singular SDK, use Singular's SDK Console (available at Settings > SDK Console) to test that your events and sessions are idenfied properly by Singular.

Step 1. Register a Device in the SDK Console

Get your Advertising IDs to Test in the SDK Console

Singular offers a Device Assist application that you can install on your test device to acquire your IDs. Download for iOS or for Android.

Register a Device in the SDK Console

To register a device:

  1. In Singular, go to Settings > SDK Console.
  2. If no device has been added yet, select Add the First Device Now. Otherwise, select Add Device.
  3. Select the appropriate Platform, Keyspace, and Identifier, and click Add.
  4. The page displays a "Registering Device..." notification. Make sure the device completes registration with our backend system. Update the device name for future reference.
  5. Confirm that the device is visible and being tracked.

Step 1a. Re-test the Device

Android

This removes all locally cached data so that “__installReferrer” will trigger again

  1. Completely close the app and confirm that it is not running (use Force Stop from the Settings menu if you have the option).
  2. Go to the Settings menu by tapping the wheel icon in your notification window or in the Apps menu.
  3. Go to Apps or Applications and select the app that you want to clear the cache/data for. Long press on the app and select App Info.
  4. Select Storage and then select Clear Cache and Clear Data.
  5. Open the Singular SDK Console and click Forget to have our system forget this device attribution.

  6. Resume normal testing.

Note: Google Play offers apps that perform this function for you (see example).

iOS

  1. Close the app and then uninstall.
  2. Open the SDK Console and click Forget to have our system forget this device attribution.

Step 2. Validate Google Play Referral for Android

After you have added the device to the SDK Console, open the app on your device. In the SDK Console, make sure you see “__instalReferrer”. This means that the device has been registered properly.

If "__instalReferrer" does not show up in SDK Console, follow the steps below to check where the problem is.

Troubleshooting

Test the Broadcast Receiver

Note: This test process applies to the old method of receiving the Google Install Referrer - through the receiver interface (read more about the receiver interface).

Open the androidmanifest.xml file and find the relevant INSTALL_REFERRER listener class.

If there are multiple receivers use the first one(the one closest to the top), for example:



In the example above the test app is using “com.adbrix.MultipleInstallBcastReceiver"

Install the APK on a test device

You must first enable android developer mode on your phone - HERE and then enable debugging mode

Install with: adb install ~/Downloads/com.game_v1.6.apk

Open SDK Console and register the device

Start your app first then execute the command below with INSTALL_REFERRER intent:

adb shell am broadcast -a com.android.vending.INSTALL_REFERRER -n com.your.app/[class from step 2] --es "referrer" "test_referrer_data"

Note: you can get the package name in the Apps page in the Singular platform.

Replace “com.app.game” with the relevant package name.

If you confirm that this shows up in the SDK console then the issue was probably timing from when you opened the app and when you started watching for events in the console.

You can export the event logs here and look for “__InstallReferrer”, or you can reset the device and try this test again by following these instructions.

If the event does not show up, check the event logs for this event - it is possible the app was opened before the device was completely registered in the SDK console.

Step 3. Validate Apple Search Ads Attribution

To validate Apple Search Ads attribution:

  1. Register the mobile device in the console. Reset the app if it has already been opened (see instructions above).
  2. In the SDK Console, confirm that “__iAd_Attribution__” event shows up:

    If the event does not show up, check the event logs for this event, as it is possible the app was opened before the device was completely registered in the SDK console.

Step 4. Validate Session Tracking

  1. Register the device in the SDK Console (see instructions above).
  2. Open the app.
  3. Validate session tracking:

    If the event does not show up, check the event logs for this event, as it is possible the app was opened before the device was completely registered in the SDK console.

Step 5. Validate the Custom User ID

  1. Register the device in the SDK Console (see instructions above).
  2. Open the app.
  3. In the app, trigger an action that sets the Custom User ID.
  4. Validate that the Custom User ID is set in Singular:

    If customer user id does not show up, check that the method is actually being called in your app. You may want to add a Singular SDK event and call it “setting custom user id” so that an event shows up in the SDK Console.

Step 6. Validate Deep-linking

1. Enable Deep-Linking

Enable deep-linking (see Appendix A: How to Implement Deep-Linking in App and the Singular Developers documentation for iOS, Android, Unity). This must be implemented independently of Singular’s SDK.

2. Add Schema

In the Singular platform, go to Settings > Apps, find the app, and add deep-links as shown in the video above.

3. Create Link to Test

In Singular:

  1. Go to Attribution > Create Custom Link and select the app from the drop-down list.
  2. Choose Partner Type or select Custom and name your own source.
  3. Select the deep-link from the drop-down list.
  4. Click Generate Link.
  5. Copy the link.

4. Test Link


Option 1:

  1. Make sure the app is installed on your test device.
  2. Email the copied link to your test device, and click the link from that device.
  3. The app should open at the page of the provided schema.

Option 2 (Android only):

Open a command line terminal on your computer to trigger a deep-link:

If you see the following error because the app doesn't yet support deep-links, see Appendix A: How to Implement Deep-Linking in App.

Frequently Asked Questions

Step 7. Validate Deferred Deep-Linking

Note: You must implement deep-linking (iOS, Android) within your app separate from the Singular SDK for this feature to work.

  1. Implement Deferred Deep-Link Handler using our documentation (iOS, Android, Unity).
    Confirm Deferred Deep-Linking is enabled on the session event in SDK Console.

  2. Add Schema to App in Dashboard:
  3. Generate a link to test:
    • Go to Attribution > Create Custom Link and select the app from the drop-down list.
    • Choose the type or select Custom and name your own source.
    • Select the deep-link from the drop-down list and click Generate.
    • Copy the link.
  4. Test Deferred Link:

If you receive errors or are unable to implement deferred deep-linking, please review the documentation (iOS, Android, Unity).

Step 8. Validate In-App Events

  1. Register the device in SDK Console.
  2. Open the app.
  3. Trigger an app event.

If the event does not show up, please check the event logs for this event as it is possible the app was opened before the device was completely registered in the SDK console.

Step 9. Validate Revenue Tracking

  1. Register the device in the SDK Console.
  2. Open the app.
  3. Trigger a revenue event.
  4. Check that the event appears properly in Singular.

Note: If the event name is “__iap_auto__”, please contact onboarding@singular.net to receive instructions on how to disable this feature.

If revenue event does not show up, please check the event logs for this event as it is possible the app was opened before the device was completely registered in the SDK console.

Step 10. Validate Uninstall Tracking

Note: You must implement the ability to send push notifications (iOS, Android) within your app separate from the Singular SDK for this feature to work

  1. Set push notification service device token in the app following Singular Documentation (iOS, Android, Unity).
  2. Add the keys in Singular:
    • Android: Go to Settings > Apps, open the app and add GCM/FCM keys.



      b. iOS: Add iOS Push Certificate

Reach out to onboarding@singular.net for final confirmation that implementation is complete.

Appendix A: How to Implement Deep-Linking in App

1. Add an Intent Filter to the Manifest

Add a new intent filter to the Activity of your Android manifest file so that the Android operating system knows which deep-links your app can handle.

The updated manifest provides the following new tags:

Tags Description
<intent-filter> Contains the view elements for the RecipeActivity.
<action> Specifies the ACTION_VIEW intent action.
<data> One for each data URI format that the activity accepts. This is the primary mechanism to declare the format for our deep-links.
<category>

Used both for BROWSABLE and DEFAULT intent categories:

BROWSABLE -- required for a mobile browser to execute the intent from within Google Search results. Without this attribute, a click on your URL from a mobile browser will not resolve to your app. Instead, the current web browser will open the URL of the website.

DEFAULT -- required only if you want your Android app to respond to a click from any referring website. The intent used from Google search results includes the identity of your app, so the intent explicitly points to your app as the recipient. Other links to your site do not know your app identity, so the DEFAULT category declares your app can accept an implicit intent.

Note: If you have multiple deep-link formats (eg. http:// and recipe-app://), you'll need to add an individual intent filter to handle each one.

2. Add Code for the Intent Filter

With the intent declared for the RecipeActivity, you now need to add the code to the sample app to show a recipe when a deep-link intent is received.

First, in the onCreate() method, add a call to onNewIntent() and pass in the intent that was sent to create the current Activity.

Then, define the onNewIntent() method and verify that the Intent is a deep-link intent. If it is a deep-link intent, extract the recipe URI from the intent data, look it up in the content provider and make a call to the showRecipe() method to display the recipe.

RecipeActivity.java

This takes the unique recipe ID in the deep-link and looks it up in the local database of the app. If a recipe with that ID is found, the app will show it on the screen.

Important: An app opened via a deep-link should provide users with a First Click Free experience. This means that on the first visit to your app, a user should go directly to the relevant content, and not be interrupted with any interstitial content like prompts or login screens. You may prompt the user for an action after the first click. The First Click Free experience must be provided even if the app has never been launched or a user logged in.

Frequently Asked Questions

How can I avoid opening multiple instances of my app on a deep-link?

 

Was this article helpful?
0 out of 0 found this helpful