| @@ -183,6 +183,7 @@ impl ZedAiOnboarding { · 182 unmodified lines |
| 183 | 183 | .full_width() |
| 184 | 184 | .style(ButtonStyle::Tinted(ui::TintColor::Accent)) |
| 185 | 185 | .on_click(move |_, _window, cx| { |
| 186 | + telemetry::event!("Upgrade To Pro Clicked", state = "young-account"); |
| 186 | 187 | cx.open_url(&zed_urls::upgrade_to_zed_pro_url(cx)) |
| 187 | 188 | }), |
| 188 | 189 | ) |
| @@ -210,6 +211,7 @@ impl ZedAiOnboarding { · 21 unmodified lines |
| 210 | 211 | .full_width() |
| 211 | 212 | .style(ButtonStyle::Tinted(ui::TintColor::Accent)) |
| 212 | 213 | .on_click(move |_, _window, cx| { |
| 214 | + telemetry::event!("Start Trial Clicked", state = "post-sign-in"); |
| 213 | 215 | cx.open_url(&zed_urls::start_trial_url(cx)) |
| 214 | 216 | }), |
| 215 | 217 | ) |
| @@ -234,7 +236,10 @@ impl ZedAiOnboarding { · 18 unmodified lines |
| 234 | 236 | .icon(IconName::ArrowUpRight) |
| 235 | 237 | .icon_color(Color::Muted) |
| 236 | 238 | .icon_size(IconSize::XSmall) |
| 237 | | − .on_click(move |_, _window, cx| cx.open_url(&zed_urls::terms_of_service(cx))), |
| 239 | + .on_click(move |_, _window, cx| { |
| 240 | + telemetry::event!("Review Terms of Service Click"); |
| 241 | + cx.open_url(&zed_urls::terms_of_service(cx)) |
| 242 | + }), |
| 238 | 243 | ) |
| 239 | 244 | .child( |
| 240 | 245 | Button::new("accept_terms", "Accept") |
| @@ -242,7 +247,9 @@ impl ZedAiOnboarding { · 1 unmodified line |
| 242 | 247 | .style(ButtonStyle::Tinted(TintColor::Accent)) |
| 243 | 248 | .on_click({ |
| 244 | 249 | let callback = self.accept_terms_of_service.clone(); |
| 245 | | − move |_, window, cx| (callback)(window, cx) |
| 250 | + move |_, window, cx| { |
| 251 | + telemetry::event!("Accepted Terms of Service"); |
| 252 | + (callback)(window, cx)} |
| 246 | 253 | }), |
| 247 | 254 | ) |
| 248 | 255 | .into_any_element() |
| @@ -267,7 +274,10 @@ impl ZedAiOnboarding { · 18 unmodified lines |
| 267 | 274 | .style(ButtonStyle::Tinted(ui::TintColor::Accent)) |
| 268 | 275 | .on_click({ |
| 269 | 276 | let callback = self.sign_in.clone(); |
| 270 | | − move |_, window, cx| callback(window, cx) |
| 277 | + move |_, window, cx| { |
| 278 | + telemetry::event!("Start Trial Clicked", state = "pre-sign-in"); |
| 279 | + callback(window, cx) |
| 280 | + } |
| 271 | 281 | }), |
| 272 | 282 | ) |
| 273 | 283 | .into_any_element() |
| @@ -294,7 +304,13 @@ impl ZedAiOnboarding { · 20 unmodified lines |
| 294 | 304 | IconButton::new("dismiss_onboarding", IconName::Close) |
| 295 | 305 | .icon_size(IconSize::Small) |
| 296 | 306 | .tooltip(Tooltip::text("Dismiss")) |
| 297 | | − .on_click(move |_, window, cx| callback(window, cx)), |
| 307 | + .on_click(move |_, window, cx| { |
| 308 | + telemetry::event!( |
| 309 | + "Banner Dismissed", |
| 310 | + source = "AI Onboarding", |
| 311 | + ); |
| 312 | + callback(window, cx) |
| 313 | + }), |
| 298 | 314 | ), |
| 299 | 315 | ) |
| 300 | 316 | }, |
| @@ -331,7 +347,13 @@ impl ZedAiOnboarding { · 30 unmodified lines |
| 331 | 347 | IconButton::new("dismiss_onboarding", IconName::Close) |
| 332 | 348 | .icon_size(IconSize::Small) |
| 333 | 349 | .tooltip(Tooltip::text("Dismiss")) |
| 334 | | − .on_click(move |_, window, cx| callback(window, cx)), |
| 350 | + .on_click(move |_, window, cx| { |
| 351 | + telemetry::event!( |
| 352 | + "Banner Dismissed", |
| 353 | + source = "AI Onboarding", |
| 354 | + ); |
| 355 | + callback(window, cx) |
| 356 | + }), |
| 335 | 357 | ), |
| 336 | 358 | ) |
| 337 | 359 | }, |
| @@ -359,7 +381,10 @@ impl ZedAiOnboarding { · 21 unmodified lines |
| 359 | 381 | .style(ButtonStyle::Outlined) |
| 360 | 382 | .on_click({ |
| 361 | 383 | let callback = self.continue_with_zed_ai.clone(); |
| 362 | | − move |_, window, cx| callback(window, cx) |
| 384 | + move |_, window, cx| { |
| 385 | + telemetry::event!("Banner Dismissed", source = "AI Onboarding"); |
| 386 | + callback(window, cx) |
| 387 | + } |
| 363 | 388 | }), |
| 364 | 389 | ) |
| 365 | 390 | .into_any_element() |