Skip to content
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
Cannot retrieve contributors at this time

Testing Marketing Link acquisition

The following instructions help you roundtrip an acquisition campaign with a Marketing Link on an Android device.

If your mobile app is not yet in Google Play, you can select any mobile app as a destination when creating the Marketing Link. This only affects the app to which the acquisition server redirects you, after you click the acquisition link, and not the ability to test the acquisition link. Query string parameters are passed to the Google Play store, which are passed to the app at install as part of a campaign broadcast. Roundtrip mobile app acquisition testing requires the simulation of this type of broadcast.

The app must be freshly installed, or have data cleared in Settings, each time a test is run. This ensures that the initial lifecycle metrics that are associated with the campaign query string parameters are sent when the app is first launched.

  1. Complete the prerequisite tasks in Mobile app acquisition and ensure that you have correctly implemented the broadcast receiver for INSTALL_REFERRER.

  2. In the Adobe Mobile Services UI, click Acquisition > Marketing Links Builder and generate an Acquisition Marketing Link URL that sets Google Play as the destination for Android devices.

    For more information, see Marketing Links Builder.

    For example:

  3. Open the generated link on the Android device.

    You should be redirected to a page with a URL similar to the following example:

  4. Copy the unique ID after utm_content%3D.

    In the previous example, the ID is 91b52ce097b1464b9b47cb2995c493cc6ab2c3a3.

    If you cannot get the unique ID on the device, run the following CURL command on your desktop to get the unique ID from the response string.

    curl -A "Mozilla/5.0 (Linux; Android 5.0.2; SAMSUNG SM-T815Y Build/LRX22G) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.133 Safari/537.36" <Your Marketing Link>

    For example:

    curl -A "Mozilla/5.0 (Linux; Android 5.0.2; SAMSUNG SM-T815Y Build/LRX22G) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.133 Safari/537.36"

  5. Construct the acquisition end link by using the unique ID from step 3, by using the following format:<appid>/end?a_ugid=<unique id>

    For example,<appid>/end?a_ugid=91b52ce097b1464b9b47cb2995c493cc6ab2c3a3

  6. Open the link in a browser.

    You should be see the contextData in the JSON response:

    {"a.launch.campaign.trackingcode":"trymttvm","":"Android Demo","a.referrer.campaign.trackingcode":"trymttvm"} 
  7. Repeat step 3 to get a new unique ID.

  8. Verify that the following settings in your config file are correct:

    Setting Value
    acquisition The server should be, and appid should equal the appid in your acquisition link.
    analytics For testing purposes, set the referrer timeout to allow for adequate time (60 seconds or more) to manually send the broadcast. You can restore the original timeout setting after testing.
  9. Connect the device to a computer, uninstall, and install the app again.

  10. Launch ADB Shell and launch the application on the device.

    adb shell
  11. Send a broadcast by using the following adb command:

am broadcast -a -n --es "referrer" "utm_source=adb_acq_v3&utm_campaign=adb_acq_v3&utm_content=<unique id get on step 5>"
  1. Replace with your application's package name, update the receiver reference with the reference of the location of the campaign tracking receiver in your app, and replace the values that are associated with utm_content.

If the broadcast is successful, you should expect a response like the following example:

Broadcasting: Intent 
{ cmp=com.adobe.adms.tests/.ReferralReceiver (has extras) } 
Broadcast completed: result=0 
  1. (Optional) You can enable debug logging of the SDK to obtain additional information.

If everything works correctly, you should see following logs:

"Analytics - Received referrer information(<referrer content>)" 
"Analytics - Trying to fetch referrer data from (acquisition end url)"; 
"Analytics - Received Referrer Data(<A JSON Response>)"

If you do not see these logs, verify that you have completed performed steps 6 to 10.

The following table contains additional information about the possible errors:

Error Description
Analytics - Unable to decode response(<string>). The response is malformed.
Analytics - Unable to parse response (a JSON Response). The JSON string is malformed.
Analytics - Unable to parse acquisition service response (no contextData parameter in response). There in no contextData parameter in the response.
Analytics - Acquisition referrer data was not complete (no in context data), ignoring. is not included in contextData.
Analytics - Acquisition referrer timed out. Failed to get the response in the time defined by referrerTimeout. Increase the value and try again. You should also ensure that you've opened the acquisition link before installing the app.

Remember the following information:

  • Hits that are sent from the app can be monitored by using HTTP monitoring tools to verify the acquisition attribution.
  • For more information about how to broadcast INSTALL_REFERRER, see Testing Google Play Campaign Measurement in the Google Developers guide .
  • You can use the provided acquisitionTest.jar Java tool to help you get the unique ID and broadcast install referrer, which in turn, helps you obtain the information in steps 3 to 10.

Install the Java tool

To install the Java tool:

  1. Download the file.

  2. Extract the .jar file.

    You can run the .jar file on the command line.

For example:

java -jar acquisitionTester.jar -a com.adobe.test -r com.adobe.test.ReferrerReceiver -l "

The Marketing Links are cached on the server side with a ten-minutes expiration time. When you make changes to marking links, wait about 10 minutes before the changes take effect before you use the links again.