Skip to content
Snippets Groups Projects
Unverified Commit 3697804c authored by Ryan Laurie's avatar Ryan Laurie Committed by GitHub
Browse files

Remove utm from source plan in upsell links (#42890)

parent 5e562cd8
Branches
Tags
No related merge requests found
......@@ -16,5 +16,5 @@ interface UpsellLinkProps {
export const useUpsellLink = ({ url, campaign, source }: UpsellLinkProps) => {
const plan = getPlan(useSetting("token-features"));
return `${url}?utm_source=product&utm_medium=upsell&utm_campaign=${campaign}&utm_content=${source}&utm_source_plan=${plan}`;
return `${url}?utm_source=product&utm_medium=upsell&utm_campaign=${campaign}&utm_content=${source}&source_plan=${plan}`;
};
......@@ -62,7 +62,7 @@ describe("Upsells > useUpsellLink", () => {
const link = screen.getByText("Link");
expect(link).toHaveAttribute(
"href",
`${props.url}?utm_source=product&utm_medium=upsell&utm_campaign=${props.campaign}&utm_content=${props.source}&utm_source_plan=oss`,
`${props.url}?utm_source=product&utm_medium=upsell&utm_campaign=${props.campaign}&utm_content=${props.source}&source_plan=oss`,
);
});
......@@ -78,7 +78,7 @@ describe("Upsells > useUpsellLink", () => {
const link = screen.getByText("Link");
expect(link).toHaveAttribute(
"href",
expect.stringContaining("utm_source_plan=oss"),
expect.stringContaining("source_plan=oss"),
);
});
......@@ -94,7 +94,7 @@ describe("Upsells > useUpsellLink", () => {
const link = screen.getByText("Link");
expect(link).toHaveAttribute(
"href",
expect.stringContaining("utm_source_plan=pro-cloud"),
expect.stringContaining("source_plan=pro-cloud"),
);
});
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment