Skip to content

Commit

Permalink
Log metrics on opening the App (#19)
Browse files Browse the repository at this point in the history
* Use the 'Toolkit' event group
* Use custom 'Opened Breakdown2 App' event name; this will log as an "Unknown Event" in Amplitude but ensure we have a unique event to log users opening the app
* Log any time a user opens the app (not just once)
  • Loading branch information
staceyoue authored Apr 26, 2021
1 parent c69baca commit 34b6abf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ def _log_metric_viewed_app(self):
from sgtk.util.metrics import EventMetric

EventMetric.log(
EventMetric.GROUP_APP, "Logged In", log_once=True, bundle=self
EventMetric.GROUP_TOOLKIT,
"Opened Breakdown2 App",
log_once=False,
bundle=self,
)
except:
# Ignore all errors, e.g. using a core that does not support metrics.
Expand Down

0 comments on commit 34b6abf

Please sign in to comment.