Last active
December 18, 2016 18:05
-
-
Save andreban/87cac33bd588ef217e99f86833c351ac to your computer and use it in GitHub Desktop.
Tracking home screen prompts
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
| // Setup a listener to track Add to Homescreen events. | |
| window.addEventListener('beforeinstallprompt', e => { | |
| e.userChoice.then(choiceResult => { | |
| ga('send', 'event', 'A2H', choiceResult.outcome); | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment