AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
fix(frontend): keep the DataFast signup goal named `signup` (#14173)
Nicholas Tindle571df3a94d76
diff --git a/autogpt_platform/frontend/src/services/analytics/datafast-server.test.ts b/autogpt_platform/frontend/src/services/analytics/datafast-server.test.tsindex 9ea45854d3..40bc25e774 100644--- a/autogpt_platform/frontend/src/services/analytics/datafast-server.test.ts+++ b/autogpt_platform/frontend/src/services/analytics/datafast-server.test.ts@@ -17,8 +17,6 @@ const VISITOR_ID = "a3ab2331-989f-4cfa-91c6-2461c9e3c6bd";describe("DataFast server-side account creation tracking", () => {beforeEach(() => {vi.clearAllMocks();- // Misconfiguration is reported once per server instance; give each test a- // clean instance so the assertions stay independent of test order.resetConfigErrorReportingForTests();vi.stubEnv("DATAFAST_API_KEY", "df_test");vi.stubEnv("NEXT_PUBLIC_BEHAVE_AS", "LOCAL");@@ -58,11 +56,9 @@ describe("DataFast server-side account creation tracking", () => {Authorization: "Bearer df_test","Content-Type": "application/json",},- // The goal name has to match the "Create Account" step of the DataFast- // "Site to Paid" funnel; any other name drops out of the funnel.body: JSON.stringify({datafast_visitor_id: VISITOR_ID,- name: "signup_completed",+ name: "signup",metadata: { method: "email" },}),}),diff --git a/autogpt_platform/frontend/src/services/analytics/datafast-server.ts b/autogpt_platform/frontend/src/services/analytics/datafast-server.tsindex 0a580987ff..8eda204b51 100644--- a/autogpt_platform/frontend/src/services/analytics/datafast-server.ts+++ b/autogpt_platform/frontend/src/services/analytics/datafast-server.ts@@ -8,8 +8,7 @@ import {import { environment } from "@/services/environment";const DATAFAST_GOALS_URL = "https://datafa.st/api/v1/goals";-// Must match the "Create Account" step of the DataFast "Site to Paid" funnel.-const ACCOUNT_CREATED_GOAL = "signup_completed";+const ACCOUNT_CREATED_GOAL = "signup";const DATAFAST_VISITOR_COOKIE = "datafast_visitor_id";const USER_CREATED_HEADER = "X-AutoGPT-User-Created";const VISITOR_ID_PATTERN =@@ -58,18 +57,12 @@ export async function scheduleAccountCreatedGoal(method: SignupMethod) {const reportedConfigErrors = new Set<string>();-/**- * A missing or malformed key is one deploy-time mistake, not one failure per- * signup. Report it once per server instance so a misconfiguration stays- * visible without burying the project in thousands of identical events.- */function reportConfigurationError(message: string) {if (reportedConfigErrors.has(message)) return;reportedConfigErrors.add(message);reportTrackingError(new Error(message));}-/** Restores the once-per-instance reporting state between tests. */export function resetConfigErrorReportingForTests() {reportedConfigErrors.clear();}