Fenix: Send a custom ping for `first install`

Created on 19 Dec 2019  路  18Comments  路  Source: mozilla-mobile/fenix

After some discussion with the Glean team and mgorlick, we have decided that in order to have valid data for adjust campaign users in Glean, we need to send a custom ping for first install that would include the adjust campaign. This is because the campaign is not known when the first metrics ping is sent (we must wait to get it back from the Adjust servers). Because of this we will not get data on the user's marketing campaign in the following case:

1) User installs through a marketing campaign
2) The user plays with the app for < 24 hours
3) The user deletes the app

In this case, we will not get that the user was on a campaign since it cannot be sent until the second metrics ping (on the next day)

Acceptance Criteria

  • I can see a first install ping in Glean
  • Include network, adgroup, creative in addition to campaign
  • Include adjust install timestamp as well if possible.
E5 Telemetry engverified

Most helpful comment

These are the values we have easy access to. We should be able to accommodate adding those three additional variables to the ping :) Adding that as part of the acceptance criteria.

image

All 18 comments

See https://mozilla.github.io/glean/book/user/pings/custom.html for more info on implementing this.

To make the campaign id "sticky" to the user: use lifetime:user

Adding @Dexterp37 to this so he can follow 馃槃

We can probably reference the ActivationPing when creating this new ping, but we should not add this to the ActivationPing since we probably don't want to mix these ids.

After investigating with Danica and George, we determined that Adjust actually has several fields of interest that we would like to include. To get the cleanest most complete insights we would like to include network, adgroup, creative in addition to campaign. Is this an easy add on when you make the call to Adjust?

These are the values we have easy access to. We should be able to accommodate adding those three additional variables to the ping :) Adding that as part of the acceptance criteria.

image

Danica mentioned we should try to include the Adjust install timestamp as well if possible.

We can probably reference the ActivationPing when creating this new ping, but we should _not_ add this to the ActivationPing since we probably don't want to mix these ids.

Please note that the activation ping does not send the client_id intentionally , so yes, I think that @boek is right and this should probably be a separate custom ping :)

Hope my patch helps, but I've never worked on Glean telemetry before, so I could use a review from someone who knows Glean.

Hi @sblatz and @codrut-topliceanu. Could you please give me an update as to whether this will land for the beta migration? What kind of lead time can I expect to update our queries? Thanks!

Hi @sblatz & @boek, could you please help me out with a STR to test this matter?

Hi @sblatz , as per our discussion, I've re-checked this matter on the latest Nightly Build #20630607 from 03/03 using Google Pixel 3a (Android 9)

Performed the following steps:

  1. Make sure no versions of Firefox Preview are installed on your device.

  2. Retrieved my Google Advertising ID from "Adjust Insights" app.
    Navigated to https://app.adjust.com/ou6v41x?campaign=social&adgroup=twitter&creative=fr-gtm&gpsadid=51577905-af05-42b7-a0d4-72975aaddc2b
    Redirected me to the Play Store (Did not install Fenix)

  3. Grabbed the APK and installed it from : https://firefox-ci-tc.services.mozilla.com/tasks/index/project.mobile.fenix.v2.nightly/latest

  4. Launched Fenix.
    鉂楋笍 No installation ping got generated.

  5. Forced close it and re-launched it
    鉂楋笍 No installation ping got generated.

  6. Force closed Fenix set the date to T+1 and time to 03:59 AM
    鉂楋笍 Checked the metrics ping (generated at 04:00 AM) and the "metrics.adjust_campaign" didn't get populated.

        "string": {
          "geckoview.build_id": "20200301094802",
          "geckoview.version": "75.0a1",
          "gfx.adapter.primary.description": "Model: Pixel 3a, Product: sargo, Manufacturer: Goo",
          "gfx.adapter.primary.device_id": "Adreno (TM) 615",
          "gfx.adapter.primary.device_id_last_seen": "Adreno (TM) 615",
          "gfx.adapter.primary.driver_date": "",
          "gfx.adapter.primary.driver_files": "",
          "gfx.adapter.primary.driver_vendor": "",
          "gfx.adapter.primary.driver_version": "OpenGL ES 3.2 [email protected] (GIT@97eb455, I987d6683f9) (",
          "gfx.adapter.primary.subsystem_id": "",
          "gfx.adapter.primary.vendor_id": "Qualcomm",
          "metrics.adjust_campaign": "",
          "metrics.toolbar_position": "BOTTOM"
        },

Please re-view and share your thoughts. 鈽猴笍
I'll remove the QA needed label until further notice.

Glean dashboard
Logcat

@AndiAJ I removed your device from the adjust dashboard. Can you please retest tomorrow with the steps we chatted about?

If you run into issues, please ping me on Slack and we can sync up again when I'm online tomorrow morning 馃槃

Hi, verified as fixed on the latest Nightly Build #20650606 from 03/05 using a Google Pixel 3a (Android 9)


鉁旓笍 Installation ping (dropdown)

{
"metadata": {
"geo": {
"city": "Cluj-Napoca",
"subdivision1": "CJ",
"country": "RO",
"db_version": "2020-03-02T19:03:33Z"
},
"user_agent": {
"os": "Android"
},
"header": {
"date": "Thu, 05 Mar 2020 10:04:37 GMT",
"x_debug_id": "aj-t0503000"
},
"document_namespace": "org-mozilla-fenix-nightly",
"document_type": "installation",
"document_version": "1"
},
"submission_timestamp": "2020-03-05T10:04:37.755732Z",
"document_id": "1298c697-5f03-466e-9a0c-95f20aba343d",
"normalized_channel": "Other",
"normalized_os": "Android",
"normalized_os_version": "9",
"normalized_country_code": "RO",
"client_info": {
"android_sdk_version": "28",
"app_build": "20650606",
"app_channel": "fenixNightly",
"app_display_version": "Nightly 200305 06:01",
"architecture": "arm64-v8a",
"device_manufacturer": "Google",
"device_model": "Pixel 3a",
"first_run_date": "2020-03-05+02:00",
"locale": "en-US",
"os": "Android",
"os_version": "9",
"telemetry_sdk_build": "25.0.0"
},
"metrics": {
"datetime": {
"installation.timestamp": "2020-03-05T12:04:37.557+02:00"
},
"string": {
"installation.adgroup": "twitter",
"installation.campaign": "social",
"installation.creative": "fr-gtm",
"installation.network": "Product Marketing"
}
},
"ping_info": {
"end_time": "2020-03-05T12:04+02:00",
"seq": 0,
"start_time": "2020-03-05T12:04+02:00"
}
}


鉁旓笍 Metrics ping (dropdown)

{
"metadata": {
"geo": {
"city": "Cluj-Napoca",
"subdivision1": "CJ",
"country": "RO",
"db_version": "2020-03-02T19:03:33Z"
},
"user_agent": {
"os": "Android"
},
"header": {
"date": "Fri, 06 Mar 2020 02:00:00 GMT",
"x_debug_id": "aj-t0503000"
},
"document_namespace": "org-mozilla-fenix-nightly",
"document_type": "metrics",
"document_version": "1"
},
"submission_timestamp": "2020-03-05T10:06:21.024907Z",
"document_id": "61ffb84c-f271-457d-9a1d-c0dc81ff2fc4",
"normalized_channel": "Other",
"normalized_os": "Android",
"normalized_os_version": "9",
"normalized_country_code": "RO",
"sample_id": 4,
"client_info": {
"android_sdk_version": "28",
"app_build": "20650606",
"app_channel": "fenixNightly",
"app_display_version": "Nightly 200305 06:01",
"architecture": "arm64-v8a",
"client_id": "35829565-ebf4-4da0-aa9e-d48a6a4b0d5f",
"device_manufacturer": "Google",
"device_model": "Pixel 3a",
"first_run_date": "2020-03-05+02:00",
"locale": "en-US",
"os": "Android",
"os_version": "9",
"telemetry_sdk_build": "25.0.0"
},
"metrics": {
"boolean": {
"gfx.status.headless": false,
"metrics.default_browser": false
},
"quantity": {
"gfx.adapter.primary.ram": 0,
"gfx.display.count": 1,
"gfx.display.primary_height": 2220,
"gfx.display.primary_width": 1080
},
"string": {
"geckoview.build_id": "20200304084140",
"geckoview.version": "75.0a1",
"gfx.adapter.primary.description": "Model: Pixel 3a, Product: sargo, Manufacturer: Goo",
"gfx.adapter.primary.device_id": "Adreno (TM) 615",
"gfx.adapter.primary.driver_date": "",
"gfx.adapter.primary.driver_files": "",
"gfx.adapter.primary.driver_vendor": "",
"gfx.adapter.primary.driver_version": "OpenGL ES 3.2 [email protected] (GIT@97eb455, I987d6683f9) (",
"gfx.adapter.primary.subsystem_id": "",
"gfx.adapter.primary.vendor_id": "Qualcomm",
"metrics.adjust_campaign": "social",
"metrics.toolbar_position": "BOTTOM"
},
"string_list": {
"metrics.mozilla_products": []
},
"timing_distribution": {
"geckoview.startup_runtime": {
"sum": 852000000,
"values": {
"827968132": 1,
"902905650": 0
}
}
}
},
"ping_info": {
"end_time": "2020-03-06T04:00+02:00",
"reason": "today",
"seq": 0,
"start_time": "2020-03-06T03:59+02:00"
}
}

Glean dashboard

@sblatz - Many thanks! 鈽猴笍

@sblatz @boek , are we intentionally not including the client_id here? I would like to be able to connect this to the other Glean pings and I thought that was ok. I need the client_id to make the right connection.

@sblatz @boek , are we intentionally not including the client_id here? I would like to be able to connect this to the other Glean pings and I thought that was ok. I need the client_id to make the right connection.

Given what this ping contains, there might be implications in doing that (maybe). At least that's the reasoning behind the similar choice for the 'activation' ping. This should be checked by data-stewards.

@Dexterp37 @sblatz , the goal of including this ping was to help us do acquisition channel attribution for retention metrics. We needed this ping to ensure we weren't missing people that bounce or cases where the properties weren't returned in time by Adjust to make the ping schedule for the metrics ping.

Context:
Retention is derived from examining when people come back to the product using the Baseline ping. Acquisition channels are captured on the metrics ping, however we know we are missing the first session attribution for some users that bounce. Thus, without having the client_id on this ping we lose the majority of value we might gain in our understanding of acquisition channel retention. I don't know who did and did not show up later in our data.

Acquisition is complex and more than 1 property is needed to determine acquisition channel attribution. We need all of these properties on the pings that contain acquisition details (metrics and first install)

Outstanding Questions:
1) If we don't include identifiers for the google advertising id as we do on the activation ping, why can't we include the client_id? These properties should be acquisition attribution properties only.

2) If it is not ok to include client_id here why is it ok to include it on the metrics ping which should have the same information?

3) Why doesn't the metrics ping have the installation properties? I only see the old Adjust_campaign_id field.

4)When should I expect representative data to land? I only see ~30 rows of data in our database.

5) How long does the data stewards process take? Who owns this work?

hey @magorlick, sorry about that - since this ping doesn't include the Google Ad ID [1, 2], there shouldn't be any reason we can't include the client id here. I think I misunderstood initially, so we should do that. As for [3] and including the additional properties, we should be able to add that, because those are just the missing fields there.

So I'll file a bug for a) adding the client_id to the installation ping, and updating the metrics ping to include the new adjust campaign fields. EDIT: #9136

As for representative data, this change should have gone to release with 4.0.0 - this went to 100% 3/11 (and was first released at 1% on 3/9).

Thanks for these details @liuche! I appreciate your prioritization of this work.

Was this page helpful?
0 / 5 - 0 ratings