Repository navigation
Count iPhone installs and installs that finish in the background - #21
Merged
Merged
Conversation
On iPhone the install suggestion can only show Add to Home Screen steps, so its only button was Not now and every iPhone install was counted as a dismissal. It now offers I added it beside Not now, which sends the existing install event. A browser install event is also sent when the tab is already in the background, with keepalive like a click. No new event, field or identifier; disclosures updated.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before: on iPhone the install suggestion only shows Add to Home Screen steps, and its only button is Not now, so every iPhone visitor who installs is counted as a dismissal and never as an install. On Android and desktop, an install that finishes after the tab goes to the background is dropped.
After: the iPhone suggestion shows I added it beside Not now (same two-button layout, the button that says "Install now" on other browsers). Tapping it closes the prompt, starts the usual 14-day quiet period and sends the existing
installevent. The browser's own install event is sent even if the tab is hidden, kept alive like a click.How:
src/main.tsrelabels the existing action button when there is no native prompt instead of hiding it;src/analytics.tsexemptsinstallfrom the visible-tab rule and treats it as an action for keepalive. No new event, field, label or identifier; still one attempt, no queue or retry, and privacy/offline suppression unchanged. Kingston and Brockville disclosures anddeployments/kingston/ANALYTICS.mdsay installs include the iPhone confirmation. Unit tests updated (install sent once while hidden, survives backgrounding, keepalive). Release is separate per community.