mirror of
https://github.com/ow-mods/ow-mod-man.git
synced 2025-12-11 20:15:50 +01:00
Fix endpoint URL for GAnalytics
This commit is contained in:
parent
0674913273
commit
f0994af59e
4
.gitignore
vendored
4
.gitignore
vendored
@ -23,4 +23,6 @@ dist-ssr
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
*.sw?
|
||||
|
||||
.env
|
||||
|
||||
@ -62,7 +62,7 @@ impl AnalyticsPayload {
|
||||
|
||||
pub async fn send_analytics_event(event_name: AnalyticsEventName, unique_name: &str) -> Result<()> {
|
||||
if let Some(api_key) = API_KEY {
|
||||
let url = format!("https://www.google-analytics.com/mp/collect?measurement_id=${MEASUREMENT_ID}&api_secret=${api_key}");
|
||||
let url = format!("https://www.google-analytics.com/mp/collect?measurement_id={MEASUREMENT_ID}&api_secret={api_key}");
|
||||
let client = Client::new();
|
||||
let payload = AnalyticsPayload::new(&event_name, unique_name);
|
||||
let resp = client.post(url).json(&payload).send().await?;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user