[MM-48759] track event when redirect from cws signup with utm campaign

Этот коммит содержится в:
Muhammad S
2022-12-16 14:29:56 +02:00
родитель e58b6ffa3e
Коммит 668518f0f4

Просмотреть файл

@@ -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)
}