ADBMobile JSON Config

Information to help you use the ADBMobile JSON Config file.

This section contains the following information:

ADBMobileConfig.json Config File Reference

The same config file can be used for your app across multiple platforms.

iOS: The ADBMobileConfig.json can be placed anywhere that it is accessible in your bundle.

Android: The ADBMobileConfig.json must be placed in the assets folder.

Variable Minimum SDK Version Description
acquisition 4.1

Enables mobile app acquisition.

server - Acquisition server that is checked at the initial launch for an acquisition referrer.

appid - Generated ID that uniquely identifies this app on the acquisition server.

If this section is missing, you need to enable Mobile App acquisition and then re-download the SDK configuration file.

See also: referrerTimeout below.

analyticsForwardingEnabled 4.8.0 Default value is false. Property in the audienceManager object. If Audience Manager is configured and analyticsForwardingEnabled is set to true, all Analytics traffic is also be forwarded to Audience Manager.
backdateSessionInfo 4.6

Enables/disables the ability for the Adobe SDK to backdate session info hits. Session info hits currently consist of crashes and session length. When disabled, the Adobe SDK will attach the session info to the current lifecycle.

The default is false.

When enabled, the Adobe SDK will backdate the session info hit to 1 second after the last hit of the previous session. This means that crashes and session data will correlate with the correct date in which they happened. This does, however, have a side effect in which it might create a visit for the backdated hit. One hit will be backdated on every new launch of the application.

When you set backdateSessionInfo to false, the SDK returns to its pre-4.1 behavior of lumping the session info for the previous session with the first hit of the subsequent session, thus avoiding the creation of an inflated visit. Using this option will cause an immediate drop in visit counts as inflated visits are no longer created.

Be aware that backdated session hit information is sent in a session info server call. Additional server calls may apply.

batchLimit 4.1

Threshold for number of hits to be sent in consecutive calls. For example, if batchLimit is set to 10, each hit prior to the 10th hit will be stored in the queue. Once the 10th hit comes in, all 10 hits will be sent consecutively

Default: 0 (Batching not enabled)

Requires offlineEnabled = true

charset 4.0 Defines the character set you are using for the data sent to Analytics. The charset is used to convert incoming data into UTF-8 for storage and reporting. See Using the charSet Property.
clientCode 4.0 (Required by Target) Your assigned client code.
lifecycleTimeout 4.0

Default: 300 seconds

Specifies the length of time, in seconds, that must elapse between app launches before the launch is considered a new session. This timeout also applies when your application is sent to the background and reactivated. The time that your app spends in the background is not included in the session length.

messages 4.2

Generated automatically by Adobe Mobile services, defines the settings for in-app messaging. For details, see Messages Description below.

offlineEnabled 4.0

When enabled, hits are queued while the device is offline and sent later when the device is online. Your report suite must be timestamp-enabled to use offline tracking.

Default: false

Important: If timestamps are enabled on your report suite, your offlineEnabled configuration property must be true. if your report suite is not timestamp enabled, your offlineEnabled configuration property must be false. If this is not configured correctly, data will be lost. If you are not sure if a report suite is timestamp enabled, contact Customer Care or download the configuration file from Adobe Mobile services.

If you are currently reporting AppMeasurement data to a report suite that also collects data from JavaScript, you might need to set up a separate report suite for mobile data, or include a custom timestamp on all JavaScript hits using the s.timestamp variable.

org 4.3

Specifies the Marketing Cloud org ID for the visitor ID service.

poi 4.0

Each POI array holds the POI name, latitude, longitude, and radius (in meters) for the area of the point. The POI name can be any string.

When a trackLocation call is sent, if the current coordinates are within a defined POI, a context data variable is populated and sent with the trackLocation call.

"poi" : [
            ["san francisco",37.757144,-122.44812,7000],
            ["santa cruz",36.972935,-122.01725,600]
        ]
Note: Starting in version 4.2, POIs are defined in the Adobe Mobile interface and then synchronized dynamically to the app configuration file. This synchronization requires the analytics.poi setting:
“analytics.poi”: “https://assets.adobedtm.com/…/yourfile.json”,

If this is not configured, the ADBMobile.json file must be updated to include this line. See "Before you Start" to download an updated configuration file.

postback 4.6

The definition for the "callback" message template is shown below:

"payload": {
	"templateurl": "", // required - will be token-expanded prior to being sent
	"templatebody": "", // optional - if this length > 0 POST will be used as transport method. This is a base64 encoded blob, which will be decoded and token-expanded prior to being sent.
	"contenttype": "", // optional - if this is length > 0 and POST type is selected this will be set as the Content-Type header.  if this is not supplied for a POST request, the default will be "application/x-www-form-urlencoded"
	"timeout": 0 // optional - number of seconds to wait before timing out.  Default is 2.
}

The payload object in the code is an example payload for a message definition that would go in ADBMobileConfig.json.

For more information, see the applicable topic:

privacyDefault 4.0

Default: optedin

  • optedin - hits are sent immediately.
  • optedout - hits are discarded.
  • optunknown - If your report suite is timestamp-enabled, hits are saved until the privacy status changes to opt-in (then hits are sent) or opt-out (then hits are discarded). If your report suite is not timestamp-enabled, hits are discarded until the privacy status changes to opt in.

This sets the initial value only. If this value is ever set or changed in code, then the new value is used going forward until it is changed, or the app is uninstalled and then reinstalled.

referrerTimeout 4.1

(Required by acquisition) Number of seconds the SDK waits for acquisition referrer data on the initial launch before timeout. If you are using acquisition, we recommend a 5 second timeout.

If set to 0 or if not included, the SDK does not wait for acquisition data and acquisition metrics are not tracked.

remotes 4.2

Configured automatically, defines the Adobe hosted endpoints for dynamic configuration files. The last update time of each configuration file is checked against the current version at each launch, and any updates are downloaded and saved.

analytics.poi - endpoint for hosted POI configuration.

messages - endpoint for hosted in-app message configuration.

rsids 4.0

(Required by Analytics) One or more report suites to receive Analytics data. Multiple report suite IDs should be comma-separated with no space between.

"rsids" : "rsid"
"rsids" : "rsid1,rsid2"
server 4.0

(Required by Analytics and/or Audience Management). Analytics or Audience Management server, based on the parent node.

This variable should be populated with the server domain, without an "http://" or https://" protocol prefix. The protocol prefix is handled automatically by the library based on the ssl variable.

If ssl is true, a secure connection is made to this server. If ssl is false, a non-secure connection is made to this server.

ssl 4.0

Default: true

Enables (true) or disables (false) sending measurement data via SSL (HTTPS).

The definition for the "callback" message template is shown below:

"payload": {
	"templateurl": "", // required - will be token-expanded prior to being sent
	"templatebody": "", // optional - if this length > 0 POST will be used as transport method. This is a base64 encoded blob, which will be decoded and token-expanded prior to being sent.
	"contenttype": "", // optional - if this is length > 0 and POST type is selected this will be set as the Content-Type header.  if this is not supplied for a POST request, the default will be "application/x-www-form-urlencoded"
	"timeout": 0 // optional - number of seconds to wait before timing out.  Default is 2.
}

The payload object in the code is an example payload for a message definition that would go in ADBMobileConfig.json.

For more information, see the applicable topic:

timeout 4.0 Determines how long Target waits for a response.

Sample ADBMobileConfig.json File

The following is an example of an ADBMobileConfig.json file:

{
    "version": "2014-08-05T19:18:28.169Z",
    "marketingCloud" : {
        "org": "016D5C175213CCA80A490D05@AdobeOrg"
    },
    "target": {
        "clientCode": "",
        "timeout": 5
    },
    "audienceManager": {
        "server": "",
        "analyticsForwardingEnabled": false
    },
    "acquisition": {
        "server": "c00.adobe.com",
        "appid": "10a77a60192fbb628376e1b1daeeb65debf934e2c807e067ceb2963a41b165ee"
    },
    "analytics": {
        "rsids": "coolApp",
        "server": "my.CoolApp.com",
        "ssl": false,
        "offlineEnabled": true,
        "charset": "UTF-8",
        "lifecycleTimeout": 300,
        "privacyDefault": "optedin",
        "batchLimit": 0,
        "referrerTimeout": 5,
        "poi": [
            ["san francisco",37.757144,-122.44812,7000], 
            ["santa cruz",36.972935,-122.01725,600]
        ]
    },
    "messages": [
        {
            "messageId": "cb426565-a563-497a-a889-9dbeb451f8ae",
            "template": "fullscreen",
            "payload": {
                 "html": "<!DOCTYPE html><html><head><meta charset=\"utf-8\" /><title></title><style></style></head><body><iframe src=\"http://www.adobe.com/\" frameborder=\"0\"></iframe></body></html>"
            },
            "showOffline": false,
            "showRule": "always",
            "endDate": 2524730400,
            "startDate": 0,
            "audiences": [],
            "triggers": [
                {
                    "key": "pev2",
                    "matches": "eq",
                    "values": [
                        "AMACTION:custom"
                    ]
                }
            ]
        }
    ],
    "remotes": {
        "analytics.poi": "https://assets.adobedtm.com/staging/42a6fc9b77cd9f29082cf19b787bae75b7d1f9ca/scripts/satellite-53e0faadc2f9ed92bc00003b.json",
        "messages": "https://assets.adobedtm.com/staging/42a6fc9b77cd9f29082cf19b787bae75b7d1f9ca/scripts/satellite-53e0f9e2c2f9ed92bc000032.json"
    }
}

Messages description

The messages node is generated automatically by Adobe Mobile services and typically does not need to be manually changed. The following description is provided for troubleshooting purposes:

  • "messageId"

    • Generated ID, required

  • "template"

    • "alert", "fullscreen", or "local"

    • required

  • "showOffline"

    • true or false

    • default is false

  • "showRule"

    • "always", "once", or "untilClick"

    • required

  • "endDate"

    • number of seconds since Jan 1, 1970

    • default is 2524730400

  • "startDate"

    • number of seconds since Jan 1, 1970

    • default is 0

  • "payload"

    • "html"

      • fullscreen template only, required

      • html defining the message

    • "image"

      • fullscreen only, optional

      • url to the image to be used for a fullscreen image

    • "altImage"

      • fullscreen only, optional

      • name of the bundled image to use if the url specified in

        image

        is unreachable

    • "title"

      • fullscreen and alert, required

      • title text for a fullscreen or alert message

    • "content"

      • alert and local notification, required

      • sub-text for an alert message, or notification text for a local notification message

    • "confirm"

      • alert, optional

      • text used in the confirm button

    • "cancel"

      • alert, required

      • text used in the cancel button

    • "url"

      • alert, optional

      • url action to load if the confirm button is clicked

    • "wait"

      • local notification, required

      • amount of time to wait (in seconds) to post the local notification after matching its criteria

  • "audiences"

    • array of objects that defines how the message should be shown

    • "key"

      • variable name to look for in the hit, required

    • "matches"

      • type of matcher used when doing the comparison

        • eq = equals

        • ne = does not equal

        • co = contains

        • nc = does not contain

        • sw = starts with

        • ew = ends with

        • ex = exists

        • nx = does not exist

        • lt = less than

        • le = less than or equals

        • gt = greater than

        • ge = greater than or equals

    • "values"

      • an array of values used to match against the value of the variable named in

        key

        with the matcher type in

        matches

  • "triggers"

    • same as audiences, but this is the action instead of the audience

    • "key"

    • "matches"

    • "values"