Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement feedback for telemetry #4168

Merged
merged 2 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ import { GiftIcon } from "../../../Icons";
import { useL10n } from "../../../../hooks/l10n";
import { VisuallyHidden } from "../../../VisuallyHidden";
import { useOverlayBugWorkaround } from "../../../../hooks/overlayBugWorkaround";
import { useGaViewPing } from "../../../../hooks/gaViewPing";

export type WhatsNewEntry = {
title: string;
Expand Down Expand Up @@ -344,7 +345,11 @@ export const WhatsNewMenu = (props: Props) => {
? getPeriodicalPremiumSubscribeLink(props.runtimeData, "yearly")
: undefined;

const yearlyPlanRefWithCoupon = `${yearlyPlanLink}&coupon=HOLIDAY20&utm_source=fx-relay&utm_medium=announcement&utm_campaign=holiday-promo-2023`;
const yearlyPlanRefWithCoupon = `${yearlyPlanLink}&coupon=HOLIDAY20&utm_source=relay.firefox.com&utm_medium=whatsnew-announcement&utm_campaign=relay-holiday-promo-2023`;
const getYearlyPlanBtnRef = useGaViewPing({
category: "Holiday Promo News CTA",
label: "holiday-promo-2023-news-cta",
});

const holidayPromo2023: WhatsNewEntry = {
title: l10n.getString("whatsnew-holiday-promo-2023-news-heading"),
Expand All @@ -359,6 +364,7 @@ export const WhatsNewMenu = (props: Props) => {
cta={
<Link
href={yearlyPlanRefWithCoupon}
ref={getYearlyPlanBtnRef}
onClick={() => {
gaEvent({
category: "Holiday Promo News CTA",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const HolidayPromoBanner = (props: Props) => {
}

const utmParams =
"&utm_source=fx-relay&utm_medium=banner&utm_content=holiday-promo-banner-cta&utm_campaign=holiday-promo-2023";
"&utm_source=fx-relay&utm_medium=banner&utm_content=holiday-promo-banner-cta&utm_campaign=relay-holiday-promo-2023";
const subscriberLinkWithCoupon = `${subscribeLink}&coupon=${coupon}${utmParams}`;

return (
Expand Down