Edit in GitHubLog an issue

Advanced Configuration

Configuration Keys

This section details how to programmatically configure the Content Analytics extension.

The following config settings are available. These settings can also be managed within the Adobe Content Analytics extension.

SettingTypeDefaultDescription
configId
String
N/A
batchingEnabled
Boolean
true
maxBatchSize
Integer
10
flushInterval
Integer
2000
trackExperiences
Boolean
true
excludedAssetLocationsRegexp
String
-
excludedAssetUrlsRegexp
String
-
excludedExperienceLocationsRegexp
String
-
debugLogging
Boolean
false

All keys are prepended with contentanalytics..

You can configure the extension through the Data Collection Content Analytics extension UI, or programmatically.

Copied to your clipboard
MobileCore.updateConfiguration(mapOf(
"contentanalytics.maxBatchSize" to 20,
"contentanalytics.batchFlushInterval" to 5000
))

Datastream

You can stream data from content analytics through a separate datastream.

To route Content Analytics to a different datastream:

Copied to your clipboard
{
"edge.configId": "main-datastream-id",
"contentanalytics.configId": "content-analytics-datastream-id"
}

If contentanalytics.configId is not set, the default edge.configId is used.

Batching

You can use the following flush triggers:

  • Batch reaches maxBatchSize.
  • Timer reaches batchFlushInterval (ms).
  • App backgrounds.
Copied to your clipboard
{
"contentanalytics.batchingEnabled": true,
"contentanalytics.maxBatchSize": 10,
"contentanalytics.batchFlushInterval": 2000
}

To disable flushes for immediate sends:

Copied to your clipboard
{ "contentanalytics.batchingEnabled": false }

Filtering

You filter content analytics events through regular expressions.

By URL

An example of a regex that filters out URLs.

Copied to your clipboard
{ "contentanalytics.excludedAssetUrlsRegexp": ".*\\.gif$|.*spinner.*" }

By Location

An example of a regex that filers our asset and experience locations.

Copied to your clipboard
{ "contentanalytics.excludedAssetLocationsRegexp": "^(debug|test).*" }
{ "contentanalytics.excludedExperienceLocationsRegexp": "^admin\\..*" }

Privacy

To manage privacy, use the consent API's.

Copied to your clipboard
// Opt in
Consent.update(mapOf("consents" to mapOf("collect" to mapOf("val" to "y"))))
// Opt out
Consent.update(mapOf("consents" to mapOf("collect" to mapOf("val" to "n"))))
// Pending
Consent.update(mapOf("consents" to mapOf("collect" to mapOf("val" to "p"))))
ValueResult
"y"
Events sent
"n"
Events dropped
"p"
Events queued

Legacy

The legacy privacy APIs also should work.

Copied to your clipboard
MobileCore.setPrivacyStatus(MobilePrivacyStatus.OPT_IN) // send
MobileCore.setPrivacyStatus(MobilePrivacyStatus.OPT_OUT) // drop + clear
MobileCore.setPrivacyStatus(MobilePrivacyStatus.UNKNOWN) // queue

Data Deletion

To delete data, use resetIdentities() to reset identities, clear cache and queue.

Copied to your clipboard
MobileCore.resetIdentities() // clears cache + queue

Featurization

Featurization is configured automatically. Sends experience content to the machine learning service for feature extraction.

See below for an example of the payload to send.

Copied to your clipboard
{
"experienceId": "mobile-abc123",
"orgID": "YOUR_ORG@AdobeOrg",
"content": {
"images": [{"value": "https://...jpg", "style": {}}],
"texts": [{"value": "Title", "style": {"role": "headline"}}],
"ctas": [{"value": "Buy", "style": {"enabled": true}}]
}
}

Tuning Batch Settings

The default settings (maxBatchSize: 10, batchFlushInterval: 2000 ms) should work well for most apps. Adjust these settings based on your event volume:

Events per MinutemaxBatchSizebatchFlushInterval (ms)Notes
< 10
10 (default)
2000 (default)
Default works well
10-50
15-25
3000
Reduces network calls
> 50
25-50
5000
High-volume optimization

Trade-off: Larger batches reduce network overhead but increase latency before data appears in reporting.

Debugging

Use setLogLevel() to set the debugging level.

Copied to your clipboard
MobileCore.setLogLevel(LoggingMode.VERBOSE)

Log entries are tagged. See below for the various tags.

  • [ContentAnalytics] - main
  • [ContentAnalytics.Batch] - batching
  • [ContentAnalytics.Featurization] - ML service
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2026 Adobe. All rights reserved.