Configuring application usage tracking

You can control whether application usage data is tracked and how it is shared by setting the options found in Settings.bundle file root.plist and the DeploymentKitApp file MyConfiguration.plist.

Perform this task in the copy of the DeploymentKitApp in Xcode on your computer.

Prerequisites

To configure the app to track usage, you must have a Google Analytics Identifier and a Google Tag Manager Container ID.

Procedure

  1. In the Xcode project navigator, find and open the file DeploymentKitApp/Settings/Settings.bundle/Root.plist.
    Note: You can customize most settings in Root.plist by editing key and value pairs in the Property List view in XCode.
    1. In the Property List view, find the setting Share Usage Data with Developers.
      Key Type Value
      Item 13 (Toggle Switch - Share Usage Data with Developers) Dictionary (4 items)
      Type String Toggle Switch
      Title String Share Usage Data with Developers
      Identifier String do_tracking
      Default Value Boolean No
      Note: In the Source Code view, this section appears as follows.
      <dict>
         <key>Type</key>
         <string>PSToggleSwitchSpecifier</string>
         <key>Title</key>
         <string>Share Usage Data With Developers</string>
         <key>Key</key>
         <string>do_tracking</string>
         <key>DefaultValue</key>
         <false/>
    2. Set the value from the default (NO) to YES (or in Source Code view, set it from <false/> to <true/>.
  2. Open the file MyConfiguration.plist.
    1. Find the setting GoogleAnalyticsID and assign to it the string value for the Google Analytics Identifier for your app.
    2. Find the setting GoogleTagManagerContainerID and assign to it the Google Tag Manager Container ID for your app.
      The app uses Google Tag Manager to manage event tags for your app. See Google Analytics tags for more information.
  3. Open a browser and log in to your Google Tag Manager account.
    1. Define the tags, rules, and macros for tracking within your app.
      A special macro, gaProperty, is defined in your Google Tag Manager account. This macro links tag events to your Google Analytics account. See the tag definition tables for appEvent, appTiming, and openScreen for more information about setting up your Google Tag Manager account.
      Important: You must configure this macro in Google Tag Manager as a data layer variable. The GoogleAnalyticsID you assigned in step 2 is sent automatically with each event to the Google Tag Manager.
Related reference