From 668518f0f49e3ef9fb9297b505a1a083596f1671 Mon Sep 17 00:00:00 2001 From: Muhammad S <841955+mhd-sln@users.noreply.github.com> Date: Fri, 16 Dec 2022 14:29:56 +0200 Subject: [PATCH] [MM-48759] track event when redirect from cws signup with utm campaign --- api4/user.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/api4/user.go b/api4/user.go index a35d1d6597..0d09f8f7eb 100644 --- a/api4/user.go +++ b/api4/user.go @@ -2017,9 +2017,15 @@ func loginCWS(c *Context, w http.ResponseWriter, r *http.Request) { redirectURL := *c.App.Config().ServiceSettings.SiteURL if campaign != "" { if url, ok := campaignToURL[campaign]; ok { + properties := map[string]any{ + "category": "acquisition", + "redirect_to": strings.TrimSuffix(url, "/"), + } + c.App.Srv().GetTelemetryService().SendTelemetry("product_start_redirect", properties) redirectURL += url } } + http.Redirect(w, r, redirectURL, http.StatusFound) }