Skip to content

Commit

Permalink
Map "feature upsell" events to the new "Noun Verbed" format (#20787)
Browse files Browse the repository at this point in the history
Release Notes:

- N/A
  • Loading branch information
nathansobo authored Nov 17, 2024
1 parent 31566cb commit ee207ab
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion crates/collab/src/api/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit ee207ab

Please sign in to comment.