Skip to content

Commit

Permalink
🪟 🔧 Remove utmStorage util (#22194)
Browse files Browse the repository at this point in the history
This method was only effective when we redirect users directly to
cloud.airbyte.io/signup?utm_source..... but wasn't working when users
first landed in airbyte.com with UTM params and then end up signing up.

We are managing UTM params with cross domain cookies in the different
tools we use to measure attribution (GA and Hubspot) so we don't need
this anymore.
  • Loading branch information
letiescanciano authored Feb 1, 2023
1 parent ca0792d commit 8fbd12d
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 81 deletions.
2 changes: 0 additions & 2 deletions airbyte-webapp/src/packages/cloud/cloudRoutes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { useQuery } from "hooks/useQuery";
import { useAuthService } from "packages/cloud/services/auth/AuthService";
import { useCurrentWorkspace, WorkspaceServiceProvider } from "services/workspaces/WorkspacesService";
import { setSegmentAnonymousId, useGetSegmentAnonymousId } from "utils/crossDomainUtils";
import { storeUtmFromQuery } from "utils/utmStorage";
import { CompleteOauthRequest } from "views/CompleteOauthRequest";

import { CloudRoutes } from "./cloudRoutePaths";
Expand Down Expand Up @@ -119,7 +118,6 @@ export const Routing: React.FC = () => {
const { search } = useLocation();

useEffectOnce(() => {
storeUtmFromQuery(search);
setSegmentAnonymousId(search);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import { User } from "packages/cloud/lib/domain/users";
import { useGetUserService } from "packages/cloud/services/users/UserService";
import { useAuth } from "packages/firebaseReact";
import { useInitService } from "services/useInitService";
import { getUtmFromStorage } from "utils/utmStorage";

import { FREE_EMAIL_SERVICE_PROVIDERS } from "./freeEmailProviders";
import { actions, AuthServiceState, authStateReducer, initialState } from "./reducer";
Expand Down Expand Up @@ -119,7 +118,6 @@ export const AuthenticationProvider: React.FC<React.PropsWithChildren<unknown>>
isCorporate: ctx.hasCorporateEmail(user.email),
// Which login provider was used, e.g. "password", "google.com", "github.com"
provider: firebaseUser.providerData[0]?.providerId,
...getUtmFromStorage(),
});

return user;
Expand Down
8 changes: 0 additions & 8 deletions airbyte-webapp/src/pages/routes.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import React, { useMemo } from "react";
import { Navigate, Route, Routes, useLocation } from "react-router-dom";
import { useEffectOnce } from "react-use";

import { ApiErrorBoundary } from "components/common/ApiErrorBoundary";

import { useAnalyticsIdentifyUser, useAnalyticsRegisterValues } from "hooks/services/Analytics";
import { useApiHealthPoll } from "hooks/services/Health";
import { useCurrentWorkspace } from "hooks/services/useWorkspace";
import { useListWorkspaces } from "services/workspaces/WorkspacesService";
import { storeUtmFromQuery } from "utils/utmStorage";
import { CompleteOauthRequest } from "views/CompleteOauthRequest";
import MainView from "views/layout/MainView";

Expand Down Expand Up @@ -94,12 +92,6 @@ const RoutingWithWorkspace: React.FC<{ element?: JSX.Element }> = ({ element })
};

export const Routing: React.FC = () => {
const { search } = useLocation();

useEffectOnce(() => {
storeUtmFromQuery(search);
});

// TODO: Remove this after it is verified there are no problems with current routing
const OldRoutes = useMemo(
() =>
Expand Down
47 changes: 0 additions & 47 deletions airbyte-webapp/src/utils/utmStorage.test.ts

This file was deleted.

22 changes: 0 additions & 22 deletions airbyte-webapp/src/utils/utmStorage.ts

This file was deleted.

0 comments on commit 8fbd12d

Please sign in to comment.