Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Send a custom ping for first install #7295

Closed
sblatz opened this issue Dec 19, 2019 · 18 comments
Closed

Send a custom ping for first install #7295

sblatz opened this issue Dec 19, 2019 · 18 comments
Assignees
Labels
E5 Estimation Point: about 5 days eng:qa:verified QA Verified Feature:Telemetry

Comments

@sblatz
Copy link
Contributor

sblatz commented Dec 19, 2019

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.

┆Issue is synchronized with this Jira Task

@sblatz sblatz added 🐞 bug Crashes, Something isn't working, .. Feature:Telemetry needs:group-triage labels Dec 19, 2019
@sblatz
Copy link
Contributor Author

sblatz commented Dec 19, 2019

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

@sblatz
Copy link
Contributor Author

sblatz commented Dec 19, 2019

Adding @Dexterp37 to this so he can follow 😄

@boek
Copy link
Contributor

boek commented Dec 31, 2019

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.

@boek boek added P2 Upcoming release feature request 🌟 New functionality and improvements 🐞 bug Crashes, Something isn't working, .. must and removed needs:group-triage 🐞 bug Crashes, Something isn't working, .. labels Dec 31, 2019
@boek boek added this to Prioritized Feature Backlog in Fenix Sprint Kanban Dec 31, 2019
@vesta0 vesta0 removed P2 Upcoming release feature request 🌟 New functionality and improvements 🐞 bug Crashes, Something isn't working, .. labels Dec 31, 2019
@vesta0 vesta0 changed the title [Bug] Send a custom ping for first install Send a custom ping for first install Dec 31, 2019
@vesta0 vesta0 added the E5 Estimation Point: about 5 days label Dec 31, 2019
@magorlick
Copy link

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?

@sblatz
Copy link
Contributor Author

sblatz commented Jan 3, 2020

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

@sblatz
Copy link
Contributor Author

sblatz commented Jan 3, 2020

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

@Dexterp37
Copy link
Contributor

Dexterp37 commented Jan 7, 2020

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 :)

@liuche liuche moved this from Prioritized Feature Backlog to Sprint Backlog in Fenix Sprint Kanban Jan 17, 2020
codrut-topliceanu pushed a commit to codrut-topliceanu/fenix that referenced this issue Feb 4, 2020
codrut-topliceanu pushed a commit to codrut-topliceanu/fenix that referenced this issue Feb 4, 2020
codrut-topliceanu pushed a commit to codrut-topliceanu/fenix that referenced this issue Feb 4, 2020
@codrut-topliceanu
Copy link
Contributor

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

boek pushed a commit to codrut-topliceanu/fenix that referenced this issue Feb 14, 2020
boek added a commit to codrut-topliceanu/fenix that referenced this issue Feb 14, 2020
boek added a commit to codrut-topliceanu/fenix that referenced this issue Feb 15, 2020
boek added a commit to codrut-topliceanu/fenix that referenced this issue Feb 15, 2020
boek added a commit to codrut-topliceanu/fenix that referenced this issue Feb 15, 2020
boek pushed a commit that referenced this issue Feb 15, 2020
@boek boek moved this from In Dev Review to Ready for QA in Fenix Sprint Kanban Feb 15, 2020
@boek boek added the eng:qa:needed QA Needed label Feb 15, 2020
@AndiAJ
Copy link
Collaborator

AndiAJ commented Feb 19, 2020

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

@AndiAJ
Copy link
Collaborator

AndiAJ commented Mar 3, 2020

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 V@331.0 (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 AndiAJ removed the eng:qa:needed QA Needed label Mar 3, 2020
@project-bot project-bot bot moved this from Ready for QA to Sprint Backlog in Fenix Sprint Kanban Mar 3, 2020
@sblatz
Copy link
Contributor Author

sblatz commented Mar 3, 2020

@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 😄

@AndiAJ
Copy link
Collaborator

AndiAJ commented Mar 5, 2020

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 V@331.0 (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! ☺️

@AndiAJ AndiAJ closed this as completed Mar 5, 2020
@project-bot project-bot bot moved this from Sprint Backlog to Sprint 20.4 Done in Fenix Sprint Kanban Mar 5, 2020
@AndiAJ AndiAJ added the eng:qa:verified QA Verified label Mar 5, 2020
@magorlick
Copy link

@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.

@Dexterp37
Copy link
Contributor

@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.

@magorlick
Copy link

@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.

  1. How long does the data stewards process take? Who owns this work?

@liuche
Copy link
Contributor

liuche commented Mar 12, 2020

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).

@magorlick
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
E5 Estimation Point: about 5 days eng:qa:verified QA Verified Feature:Telemetry
Projects
None yet
Development

No branches or pull requests

8 participants