mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-15 22:32:13 +00:00
tts hero buttons analytics
This commit is contained in:
1 parent
cef2f4924e
commit
5935bc5790
2 files changed
+25
-3
No files matched your search
@@ -87,6 +87,18 @@ class Analytics {
|
||||
Analytics.sendCategorizedEvent(this.TTS, 'click_tts_result_link');
|
||||
}
|
||||
|
||||
static ttsClickHeroVoiceClone() {
|
||||
Analytics.sendCategorizedEvent(this.TTS, 'click_hero_voice_clone');
|
||||
}
|
||||
|
||||
static ttsClickHeroUpgradePlan() {
|
||||
Analytics.sendCategorizedEvent(this.TTS, 'click_hero_upgrade_plan');
|
||||
}
|
||||
|
||||
static ttsClickHeroSignup() {
|
||||
Analytics.sendCategorizedEvent(this.TTS, 'click_hero_signup');
|
||||
}
|
||||
|
||||
static ttsTooSlowUpgradePremium() {
|
||||
Analytics.sendCategorizedEvent(this.TTS, 'tts_too_slow_upgrade_premium');
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||
import { faStar } from "@fortawesome/free-solid-svg-icons";
|
||||
import { item, image } from "../../../../data/animation";
|
||||
import { motion } from "framer-motion";
|
||||
import { Analytics } from "../../../../common/Analytics";
|
||||
|
||||
interface Props {
|
||||
sessionWrapper: SessionWrapper;
|
||||
@@ -39,7 +40,10 @@ export function TtsPageHero(props: Props) {
|
||||
if (!props.sessionWrapper.isLoggedIn()) {
|
||||
signUpButton = (
|
||||
<>
|
||||
<Link to="/signup">
|
||||
<Link
|
||||
to="/signup"
|
||||
onClick={() => { Analytics.ttsClickHeroSignup() } }
|
||||
>
|
||||
<button type="button" className="btn btn-primary w-100">
|
||||
{t("tts.TtsModelListPage.heroSection.buttons.signUp")}
|
||||
</button>
|
||||
@@ -52,7 +56,10 @@ export function TtsPageHero(props: Props) {
|
||||
if (!props.sessionSubscriptionsWrapper.hasPaidFeatures()) {
|
||||
upgradeButton = (
|
||||
<>
|
||||
<Link to="/pricing">
|
||||
<Link
|
||||
to="/pricing"
|
||||
onClick={() => { Analytics.ttsClickHeroUpgradePlan() } }
|
||||
>
|
||||
<button type="button" className="btn btn-primary w-100">
|
||||
<FontAwesomeIcon icon={faStar} className="me-2" />
|
||||
Upgrade Plan
|
||||
@@ -103,7 +110,10 @@ export function TtsPageHero(props: Props) {
|
||||
>
|
||||
{upgradeButton}
|
||||
{signUpButton}
|
||||
<Link to="/clone">
|
||||
<Link
|
||||
to="/clone"
|
||||
onClick={() => { Analytics.ttsClickHeroVoiceClone() } }
|
||||
>
|
||||
<button type="button" className="btn btn-secondary w-100">
|
||||
{t("tts.TtsModelListPage.heroSection.buttons.cloneVoice")}
|
||||
</button>
|
||||
|
||||
Reference in new issue
Block a user