export function withUtm(
  url: string,
  utm: Partial<Record<"utm_source" | "utm_medium" | "utm_campaign" | "utm_content", string>>,
): string {
  const u = new URL(url);
  for (const [k, v] of Object.entries(utm)) {
    if (v) u.searchParams.set(k, v);
  }
  return u.toString();
}
