Map "feature upsell" events to the new "Noun Verbed" format (#20787)

Release Notes:

- N/A
This commit is contained in:
Nathan Sobo 2024-11-17 07:38:30 -07:00 committed by GitHub
parent 31566cb5a0
commit ee207ab77e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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