Omniture Analytics Component

 IV: Add Components for More Functionality

Omniture gives you a JAR file to integrate into your app (instead of relying on API keys). The JAR file stores your security keys and other configuration information.

Configure the Omniture Analytics Component

  1. Load the Omniture Analytics component into your app. See Add or Remove a Component for details about how to load a component into your app.

    Be sure to remove any other analytics components that are loaded in your app (such as FlurryAnalyticsComponent, CrashlyticsComponent, ComScoreAnalyticsComponent, or LoggerAnalyticsComponent).

  2. Inside your app's folder, create a folder called AdobeMobileLibrary.
  3. Inside this new AdobeMobileLibrary folder, put the JAR file that Adobe gives you.

    For example, if the JAR file were named adobeMobileLibrary-4.6.1.jar, the path to the file would look like this: (your app) > AdobeMobileLibrary > adobeMobileLibrary-4.6.1.jar.

  4. In the AdobeMobileLibrary folder, open the build.gradle file add a reference to your JAR file:

    artifacts.add("default", file('adobeMobileLibrary-4.6.1.jar'))
  5. Inside your app's settings.gradle file, include the AdobeMobileLibrary component:

    include  ':app',
  6. In the OmnitureAnalyticsComponent folder, open the build.gradle file and make sure there's a dependency for the AdobeMobileLibrary:

    dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile project(':ModuleInterface')
    compile project(':AnalyticsInterface')
    compile project(':AdobeMobileLibrary')

    Your app will now start tracking activities using Omniture Analytics.

Customize the Tag Names

You can customize the names of the analytics tags. (Tags are action or attribute names). Customizing the names can make it easier to identify activities you're interested in.

The complete list of analytics tags are available in AnalyticsInterface > java > >

Here's an example tag:

public static final String ACTION_START_APP = "ACTION_START_APP";

ACTION_START_APP (on the left) is the tag, and ACTION_START_APP (on the right) is how the tag appears in your analytics. In this case, it's the same. You can customize this term with a more friendly, meaningful name.

To customize these tags with your own names:

  1. Browse to your app's assets > configurations directory.
  2. Add a JSON file to this directory called OmnitureCustomAnalyticsTags.json.
  3. Add the tags you want to customize using the following format:

      "TAG": "value",
      "TAG": "value"

    For example, to customize the ACTION_START_APP and ACTION_SEARCH tags, add them like this:

      "ACTION_START_APP":"Start App",
      "ACTION_SEARCH": "Search"

    The values on the left map to the analytics tags in The values on the right map to the new values for the tags.

    If you add a tag that is not customizable, you will see a warning in the logs indicating that the tag cannot be customized. The customization will be ignored.