Skip to content

Scheduling infrastructure for absolutely everyone.

Remove trailing } from utm param (#20763)

Joe Au-Yeung7e525779b72c
diff --git a/packages/app-store/salesforce/lib/CrmService.ts b/packages/app-store/salesforce/lib/CrmService.ts
index 581d3679470..db0874ffcc1 100644
--- a/packages/app-store/salesforce/lib/CrmService.ts
+++ b/packages/app-store/salesforce/lib/CrmService.ts
@@ -1413,7 +1413,8 @@ export default class SalesforceCRMService implements CRM {
return "";
}
- const utmParam = fieldValue.split(":")[1];
+ // Remove the {utm: and trailing } from the field value
+ const utmParam = fieldValue.split(":")[1].slice(0, -1);
return tracking[`utm_${utmParam}` as keyof typeof tracking]?.toString() ?? "";
}