From fc0ad3feb75ce2c8796790fa4a912b70ef9ddd7f Mon Sep 17 00:00:00 2001 From: Mehul Mathur Date: Tue, 21 May 2024 10:13:53 +0000 Subject: [PATCH] chore: added utm source & medium on playground url --- src/cli/server/mod.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/cli/server/mod.rs b/src/cli/server/mod.rs index 0f157a8d3c..2d6fe56987 100644 --- a/src/cli/server/mod.rs +++ b/src/cli/server/mod.rs @@ -6,6 +6,7 @@ pub mod server_config; pub use http_server::Server; use self::server_config::ServerConfig; +use crate::cli::command::VERSION; fn log_launch(sc: &ServerConfig) { let addr = sc.addr().to_string(); @@ -16,6 +17,15 @@ fn log_launch(sc: &ServerConfig) { ); let url = sc.graphiql_url(); - let url = format!("https://tailcall.run/playground/?u={}/graphql", url); + let utm_source = if VERSION.eq("0.1.0-dev") { + "tailcall-debug" + } else { + "tailcall-release" + }; + let utm_medium = "server"; + let url = format!( + "https://tailcall.run/playground/?u={}/graphql&utm_source={}&utm_medium={}", + url, utm_source, utm_medium + ); tracing::info!("🌍 Playground: {}", url); }