phetsims / phetcommon

Code that is common to all PhET simulations.
http://scenerystack.org/
MIT License
3 stars 5 forks source link

Should we track other conditions in google analytics? #49

Open samreid opened 4 years ago

samreid commented 4 years ago

From this TODO, added by @jonathanolson in 33ce29f6ab8d75339749a1b4806a38246906fdb6 for https://github.com/phetsims/yotta/issues/30

  let loadType;
  // This is the iOS app
  if ( phet.chipper.queryParameters[ 'phet-app' ] ) {
    loadType = 'phet-app';
  }
  // For the Android app, see https://github.com/phetsims/phet-android-app/issues/16
  else if ( phet.chipper.queryParameters[ 'phet-android-app' ] ) {
    loadType = 'phet-android-app';
  }
  else if ( top !== self ) {
    // Checks to see if this sim is embedded - phetsims/chipper#50
    loadType = 'embedded';
  }
  // TODO Add additional conditions for tracking hits from the installer, etc.
  else {
    loadType = 'default';
  }

We are currently distinguishing between iOS app, android app, and embedded launches. Should we add other categories here? Assigning to @jonathanolson for initial comment.

jonathanolson commented 4 years ago

Presumably we can change it to track whatever else we want, but I can't think of anything particularly important here. @kathy-phet, for html5 sims, do we want to track any other way people load sims? (Otherwise I think the TODO can be removed)