(url: string, campaign: string)
| 7 | * - utm_campaign: the specific email/template (distinguishes emails) |
| 8 | */ |
| 9 | export function withUtm(url: string, campaign: string): string { |
| 10 | const next = new URL(url); |
| 11 | next.searchParams.set('utm_source', 'openpanel'); |
| 12 | next.searchParams.set('utm_medium', 'email'); |
| 13 | next.searchParams.set('utm_campaign', campaign); |
| 14 | return next.toString(); |
| 15 | } |
no test coverage detected