more analytics

This commit is contained in:
Brandon Thomas committed 2023-01-21 00:51:51 -05:00
1 parent 8a6f833ab8
commit 3c683ba1f4
3 files changed
+15 -1

No files matched your search

@@ -96,6 +96,10 @@ class Analytics {
Analytics.sendCategorizedEvent(this.TTS, 'click_model_details_link');
}
static ttsClickModelCreatorLink() {
Analytics.sendCategorizedEvent(this.TTS, 'click_model_creator_link');
}
static ttsClickHeroViewProfile() {
Analytics.sendCategorizedEvent(this.TTS, 'click_hero_view_profile');
}
@@ -140,6 +144,10 @@ class Analytics {
Analytics.sendCategorizedEvent(this.TTS, 'open_primary_voice_select_menu');
}
static ttsOpenScopedVoiceSelectMenu() {
Analytics.sendCategorizedEvent(this.TTS, 'open_scoped_voice_select_menu');
}
static ttsOpenExploreVoicesModal() {
Analytics.sendCategorizedEvent(this.TTS, 'open_explore_voices_modal');
}
@@ -317,7 +317,11 @@ function TtsModelListPage(props: Props) {
<div className="flex-grow-1">
<p>
Model by{" "}
<Link to={profileLink} className="fw-medium">
<Link
to={profileLink}
onClick={ () => { Analytics.ttsClickModelCreatorLink() } }
className="fw-medium"
>
{userName}{" "}
<Gravatar
size={20}
@@ -11,6 +11,7 @@ import Select, { createFilter } from "react-select";
//import Option from "react-select";
import { SearchFieldClass } from "../search/SearchFieldClass";
import { FastReactSelectOption } from "../../../_common/FastReactSelectOption";
import { Analytics } from "../../../../../common/Analytics";
interface Props {
allTtsCategories: TtsCategoryType[];
@@ -133,6 +134,7 @@ export function ScopedVoiceModelOptions(props: Props) {
options={options}
classNames={SearchFieldClass}
onChange={handleChange}
onMenuOpen={() => { Analytics.ttsOpenScopedVoiceSelectMenu() } }
isLoading={isLoading}
// On mobile, we don't want the onscreen keyboard to take up half the UI.
autoFocus={false}