Bug 1891342 - Part 2: Update iconAccentViolet color to Violet70 r=android-reviewers...
[gecko.git] / mobile / android / fenix / docs / adjust.md
blobe498771392ca8d80151ca13faeb9d66c8f99e39a
1 # Adjust
3 Firefox for Android tracks certain types of installs using a third-party install tracking framework called Adjust. The intention is to determine the origin of Firefox for Android installs by answering the question, “Did this user on this device install Firefox for Android in response to a specific advertising campaign performed by Mozilla?”
5 The framework consists of a software development kit (SDK) linked into Firefox for Android and a data-collecting Internet service backend run by the German company [adjust GmbH](https://www.adjust.com). The Adjust SDK is open source and MIT licensed. It is hosted at [https://github.com/adjust/android_sdk](https://github.com/adjust/android_sdk). Firefox for Android pulls in an unmodified copy of the SDK using Gradle. The [Dependencies.kt](https://github.com/mozilla-mobile/fenix/blob/main/buildSrc/src/main/java/Dependencies.kt) contains the version of the framework that is being used. The SDK is documented at [https://docs.adjust.com](https://docs.adjust.com).
7 ## Adjust Integration
9 The Adjust framework is abstracted via the [AdjustMetricService](https://github.com/mozilla-mobile/fenix/blob/main/app/src/main/java/org/mozilla/fenix/components/metrics/AdjustMetricsService.kt) class. All interaction with Adjust happens via this class.
11 ## Adjust Messages
13 The Adjust SDK collects and sends one type of message to the Adjust backend:
15 * At the start of a new application session, a *Session Message* is sent with basic system info and how often the app has been used since the last time.
17 The message is documented below in more detail of what is sent in each HTTP request. All messages are posted to a secure endpoint at `https://app.adjust.com`. They are all `application/x-www-form-urlencoded` HTTP `POST` requests.
19 ### Session Message
21 #### Request
23 ```
24 bundle_id:               org.mozilla.fenix
25 tracking_enabled:        0
26 language:                en
27 country:                 CA
28 app_version:             4.2
29 device_name:             Pixel 2
30 app_version_short:       2.0
31 needs_response_details:  0
32 attribution_deeplink:    1
33 session_count:           1
34 os_name:                 android
35 event_buffering_enabled: 0
36 idfv:                    8D452BFB-0692-4E8C-9DE0-7578486A872E
37 hardware_name:           J127AP
38 app_token:               xxxxxxxxxxxx
39 os_version:              10.1
40 environment:             production
41 created_at:              2016-11-10T20:34:39.720Z-0500
42 device_type:             phone
43 idfa:                    00000000-0000-0000-0000-000000000000
44 sent_at:                 2016-11-10T20:34:39.787Z-0500
45 ```
47 These parameters (including ones not exposed to Mozilla) are documented at [https://partners.adjust.com/placeholders/](https://partners.adjust.com/placeholders/)
49 #### Response
51 If the application was successfully attributed to a specific campaign, details for that campaign are sent back as a JSON response:
53 ```
54 { "app_token": "xxxxxxxxxxxx",
55   "adid": "00000000000000000000",
56   "attribution" { "tracker_token": "xxxxxx",
57                   "tracker_name": "Network::CAMPAIGN::ADGROUP::CREATIVE",
58                   "network": "Network",
59                   "campaign":"CAMPAIGN",
60                   "adgroup":"ADGROUP",
61                   "creative":"CREATIVE" } }
62 ```
64 The application has no use for this information and ignores it.