mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
feat: track read about (#4478)
This commit is contained in:
parent
90f5af6b61
commit
81586074d0
@ -119,12 +119,18 @@ export const PremiumFeature = ({
|
||||
|
||||
const tracker = usePlausibleTracker();
|
||||
|
||||
const handleClick = () => {
|
||||
const trackUpgradePlan = () => {
|
||||
tracker.trackEvent('upgrade_plan_clicked', {
|
||||
props: { feature: label },
|
||||
});
|
||||
};
|
||||
|
||||
const trackReadAbout = () => {
|
||||
tracker.trackEvent('read_about', {
|
||||
props: { feature: label },
|
||||
});
|
||||
};
|
||||
|
||||
const featureLabel = Boolean(url) ? (
|
||||
<StyledLink href={url} target="_blank" rel="noreferrer">
|
||||
{label}
|
||||
@ -167,7 +173,7 @@ export const PremiumFeature = ({
|
||||
href={upgradeUrl}
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
onClick={handleClick}
|
||||
onClick={trackUpgradePlan}
|
||||
>
|
||||
Compare plans
|
||||
</StyledLink>
|
||||
@ -191,11 +197,16 @@ export const PremiumFeature = ({
|
||||
href={upgradeUrl}
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
onClick={handleClick}
|
||||
onClick={trackUpgradePlan}
|
||||
>
|
||||
Compare plans
|
||||
</Button>
|
||||
<Button href={url} target="_blank" rel="noreferrer">
|
||||
<Button
|
||||
href={url}
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
onClick={trackReadAbout}
|
||||
>
|
||||
Read about {label}
|
||||
</Button>
|
||||
</StyledButtonContainer>
|
||||
|
@ -11,6 +11,7 @@ import { EventOptions, PlausibleOptions } from 'plausible-tracker';
|
||||
export type CustomEvents =
|
||||
| 'invite'
|
||||
| 'upgrade_plan_clicked'
|
||||
| 'read_about'
|
||||
| 'change_request'
|
||||
| 'favorite'
|
||||
| 'maintenance'
|
||||
|
Loading…
Reference in New Issue
Block a user