Change summary
crates/collab/src/api/events.rs | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
Detailed changes
@@ -1520,7 +1520,22 @@ fn for_snowflake(
properties["is_first_for_channel"] = json!(true);
"App First Opened For Release Channel".to_string()
}
- _ => format!("Unknown App Event: {}", e.operation),
+ "feature upsell: toggle vim" => {
+ properties["source"] = json!("Feature Upsell");
+ "Vim Mode Toggled".to_string()
+ }
+ _ => e
+ .operation
+ .strip_prefix("feature upsell: viewed docs (")
+ .and_then(|s| s.strip_suffix(')'))
+ .map_or_else(
+ || format!("Unknown App Event: {}", e.operation),
+ |docs_url| {
+ properties["url"] = json!(docs_url);
+ properties["source"] = json!("Feature Upsell");
+ "Documentation Viewed".to_string()
+ },
+ ),
};
(event_type, properties)
}