You can control whether application usage data is tracked and how
it is shared by setting the options found in
and in
.
About this task
Perform this task in the copy
of the DeploymentKitApp in Xcode on your computer.
Before you begin
To configure the app
to track usage, you must have a Google Analytics Identifier and a Google Tag
Manager Container ID.
Procedure
-
In the Xcode project navigator, find and
open.
Note: You can customize most settings in
by editing key and value pairs in the
Property List view in
Project navigator.
-
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 is displayed 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/>
-
Set the value from the default (
NO
) to
YES
(or in
Source Code view, set it from
<false/>
to
<true/>
.
-
Open
.
-
Find the setting
GoogleAnalyticsID and assign to it the
string value for the Google Analytics Identifier for your app.
-
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.
-
Open a browser and log in to your Google Tag Manager account.
-
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.