From 7becc40b2ce153af7079d67b9489916b928a375e Mon Sep 17 00:00:00 2001 From: Bigint <69431456+bigint@users.noreply.github.com> Date: Mon, 5 Sep 2022 19:48:54 +0530 Subject: [PATCH] chore: rip hog --- .env.example | 3 +- package.json | 2 +- src/components/Comment/Feed.tsx | 4 +- src/components/Comment/New.tsx | 4 +- src/components/Crowdfund/New.tsx | 6 +- src/components/Explore/Feed.tsx | 4 +- src/components/Explore/FeedType.tsx | 4 +- src/components/Explore/index.tsx | 4 +- src/components/Home/Feed.tsx | 4 +- src/components/Home/RecommendedProfiles.tsx | 4 +- src/components/Home/SetProfile.tsx | 4 +- src/components/Home/Trending.tsx | 10 +- src/components/Home/index.tsx | 4 +- src/components/Layout.tsx | 12 +- src/components/Notification/Icon.tsx | 4 +- src/components/Notification/List.tsx | 4 +- src/components/Notification/index.tsx | 4 +- src/components/Pages/Contact.tsx | 4 +- src/components/Pages/Privacy.tsx | 4 +- src/components/Pages/Thanks.tsx | 4 +- src/components/Profile/Feed.tsx | 4 +- src/components/Profile/FeedType.tsx | 4 +- src/components/Profile/Followerings.tsx | 6 +- src/components/Profile/Followers.tsx | 4 +- src/components/Profile/Following.tsx | 4 +- .../Profile/MutualFollowers/List.tsx | 4 +- .../Profile/MutualFollowers/index.tsx | 4 +- src/components/Profile/NFTFeed.tsx | 4 +- src/components/Profile/New.tsx | 4 +- src/components/Profile/index.tsx | 4 +- .../Actions/Collect/CollectModule.tsx | 6 +- .../Publication/Actions/Collect/index.tsx | 4 +- .../Publication/Actions/Comment.tsx | 4 +- src/components/Publication/Actions/Like.tsx | 6 +- .../Publication/Actions/Menu/Delete.tsx | 4 +- .../Publication/Actions/Menu/Embed.tsx | 4 +- .../Publication/Actions/Menu/Permalink.tsx | 4 +- .../Publication/Actions/Menu/index.tsx | 4 +- src/components/Publication/Actions/Mirror.tsx | 4 +- src/components/Publication/Crowdfund/Fund.tsx | 4 +- .../Publication/Crowdfund/index.tsx | 4 +- .../Publication/New/NewPostModal.tsx | 4 +- src/components/Publication/New/index.tsx | 4 +- .../Publication/PublicationStats.tsx | 8 +- .../Publication/SinglePublication.tsx | 4 +- src/components/Publication/ThreadBody.tsx | 4 +- src/components/Publication/index.tsx | 4 +- src/components/Report/index.tsx | 6 +- src/components/Search/Profiles.tsx | 4 +- src/components/Search/Publications.tsx | 4 +- src/components/Search/index.tsx | 4 +- src/components/Settings/Account/CrossPost.tsx | 4 +- .../Settings/Account/SetProfile.tsx | 4 +- .../Settings/Account/SuperFollow.tsx | 4 +- .../Settings/Account/Verification.tsx | 4 +- src/components/Settings/Account/index.tsx | 4 +- src/components/Settings/Allowance/Button.tsx | 4 +- src/components/Settings/Allowance/index.tsx | 4 +- src/components/Settings/Delete/index.tsx | 6 +- .../Settings/Dispatcher/ToggleDispatcher.tsx | 4 +- src/components/Settings/Dispatcher/index.tsx | 4 +- .../Settings/Profile/NFTPicture.tsx | 4 +- src/components/Settings/Profile/Picture.tsx | 4 +- src/components/Settings/Profile/Profile.tsx | 4 +- src/components/Settings/Profile/index.tsx | 4 +- src/components/Shared/Follow.tsx | 4 +- src/components/Shared/Footer.tsx | 16 +-- src/components/Shared/Giphy/index.tsx | 4 +- src/components/Shared/IFramely/Embed.tsx | 4 +- src/components/Shared/Modal/Collectors.tsx | 4 +- src/components/Shared/Modal/Likes.tsx | 4 +- src/components/Shared/Modal/Mirrors.tsx | 4 +- .../Shared/Navbar/Login/WalletSelector.tsx | 6 +- src/components/Shared/Navbar/LoginButton.tsx | 4 +- src/components/Shared/Navbar/Search.tsx | 6 +- src/components/Shared/Navbar/SignedUser.tsx | 10 +- src/components/Shared/Preview.tsx | 4 +- .../Shared/SelectCollectModule/FeeEntry.tsx | 4 +- .../Shared/SelectCollectModule/Modules.tsx | 4 +- .../Shared/SelectCollectModule/index.tsx | 4 +- .../Shared/SelectReferenceModule/index.tsx | 8 +- .../Shared/SuperFollow/FollowModule.tsx | 4 +- src/components/Shared/SuperFollow/index.tsx | 4 +- src/components/Shared/SwitchNetwork.tsx | 4 +- src/components/Shared/Unfollow.tsx | 4 +- src/components/Shared/Uniswap.tsx | 4 +- src/components/StaffTools/Flags/index.tsx | 117 ------------------ src/components/StaffTools/Sidebar.tsx | 6 +- src/components/StaffTools/Stats/index.tsx | 4 +- .../utils/matchers/HashtagMatcher.tsx | 4 +- .../utils/matchers/MentionMatcher.tsx | 4 +- src/constants.ts | 4 +- src/lib/hog.ts | 38 ------ src/lib/mixpanel.ts | 15 +++ src/pages/404.tsx | 4 +- src/pages/500.tsx | 4 +- src/pages/stafftools/flags.tsx | 3 - src/tracking.ts | 3 +- yarn.lock | 26 +--- 99 files changed, 233 insertions(+), 396 deletions(-) delete mode 100644 src/components/StaffTools/Flags/index.tsx delete mode 100644 src/lib/hog.ts create mode 100644 src/lib/mixpanel.ts delete mode 100644 src/pages/stafftools/flags.tsx diff --git a/.env.example b/.env.example index e8265d94ca1b..30f76a77f6eb 100644 --- a/.env.example +++ b/.env.example @@ -2,8 +2,7 @@ NEXT_PUBLIC_API_URL="https://api-mumbai.lens.dev" NEXT_PUBLIC_RELAY_ON=false NEXT_PUBLIC_SENTRY_DSN="" NEXT_PUBLIC_ALCHEMY_KEY="" -NEXT_PUBLIC_POSTHOG_TOKEN="" -NEXT_PUBLIC_PERSONAL_POSTHOG_TOKEN="" +NEXT_PUBLIC_MIXPANEL_TOKEN="" NEXT_PUBLIC_ESTUARY_KEY="" SENTRY_AUTH_TOKEN="" SENTRY_IGNORE_API_RESOLUTION_ERROR=true diff --git a/package.json b/package.json index b511fb01042f..c75d6223edc5 100644 --- a/package.json +++ b/package.json @@ -36,11 +36,11 @@ "interweave": "^13.0.0", "interweave-autolink": "^5.1.0", "jwt-decode": "^3.1.2", + "mixpanel-browser": "^2.45.0", "next": "^12.2.6-canary.8", "next-themes": "^0.2.0", "next-transpile-modules": "^9.0.0", "plyr-react": "^5.1.0", - "posthog-js": "^1.29.3", "react": "^18.2.0", "react-cool-inview": "^3.0.1", "react-copy-to-clipboard": "^5.1.0", diff --git a/src/components/Comment/Feed.tsx b/src/components/Comment/Feed.tsx index 564a5be9a668..0ce0bf699aba 100644 --- a/src/components/Comment/Feed.tsx +++ b/src/components/Comment/Feed.tsx @@ -8,7 +8,7 @@ import { Spinner } from '@components/UI/Spinner'; import { LensterPublication } from '@generated/lenstertypes'; import { CommentFields } from '@gql/CommentFields'; import { CollectionIcon } from '@heroicons/react/outline'; -import { Hog } from '@lib/hog'; +import { Mixpanel } from '@lib/mixpanel'; import React, { FC } from 'react'; import { useInView } from 'react-cool-inview'; import { useAppStore } from 'src/store/app'; @@ -70,7 +70,7 @@ const Feed: FC = ({ publication, onlyFollowers = false, isFollowing = tru profileId: currentProfile?.id ?? null } }); - Hog.track(PAGINATION.COMMENT_FEED); + Mixpanel.track(PAGINATION.COMMENT_FEED); } }); diff --git a/src/components/Comment/New.tsx b/src/components/Comment/New.tsx index 400165962548..4ca4a225264b 100644 --- a/src/components/Comment/New.tsx +++ b/src/components/Comment/New.tsx @@ -21,7 +21,7 @@ import { ChatAlt2Icon } from '@heroicons/react/outline'; import { defaultFeeData, defaultModuleData, getModule } from '@lib/getModule'; import getSignature from '@lib/getSignature'; import getTags from '@lib/getTags'; -import { Hog } from '@lib/hog'; +import { Mixpanel } from '@lib/mixpanel'; import onError from '@lib/onError'; import splitSignature from '@lib/splitSignature'; import trimify from '@lib/trimify'; @@ -79,7 +79,7 @@ const NewComment: FC = ({ setShowModal, hideCard = false, publication }) setAttachments([]); setSelectedModule(defaultModuleData); setFeeData(defaultFeeData); - Hog.track(COMMENT.NEW); + Mixpanel.track(COMMENT.NEW); }; const { isLoading: signLoading, signTypedDataAsync } = useSignTypedData({ onError }); diff --git a/src/components/Crowdfund/New.tsx b/src/components/Crowdfund/New.tsx index af52d82f5d83..46ef7354e82d 100644 --- a/src/components/Crowdfund/New.tsx +++ b/src/components/Crowdfund/New.tsx @@ -22,8 +22,8 @@ import { PlusIcon } from '@heroicons/react/outline'; import getIPFSLink from '@lib/getIPFSLink'; import getSignature from '@lib/getSignature'; import getTokenImage from '@lib/getTokenImage'; -import { Hog } from '@lib/hog'; import imagekitURL from '@lib/imagekitURL'; +import { Mixpanel } from '@lib/mixpanel'; import onError from '@lib/onError'; import splitSignature from '@lib/splitSignature'; import uploadMediaToIPFS from '@lib/uploadMediaToIPFS'; @@ -86,11 +86,11 @@ const NewCrowdfund: NextPage = () => { const [selectedCurrencySymobol, setSelectedCurrencySymobol] = useState('WMATIC'); useEffect(() => { - Hog.track('Pageview', { path: PAGEVIEW.CREATE_CROWDFUND }); + Mixpanel.track('Pageview', { path: PAGEVIEW.CREATE_CROWDFUND }); }, []); const onCompleted = () => { - Hog.track(CROWDFUND.NEW); + Mixpanel.track(CROWDFUND.NEW); }; const { isLoading: signLoading, signTypedDataAsync } = useSignTypedData({ onError }); diff --git a/src/components/Explore/Feed.tsx b/src/components/Explore/Feed.tsx index 4d88489ff6cb..64f652104092 100644 --- a/src/components/Explore/Feed.tsx +++ b/src/components/Explore/Feed.tsx @@ -11,7 +11,7 @@ import { CommentFields } from '@gql/CommentFields'; import { MirrorFields } from '@gql/MirrorFields'; import { PostFields } from '@gql/PostFields'; import { CollectionIcon } from '@heroicons/react/outline'; -import { Hog } from '@lib/hog'; +import { Mixpanel } from '@lib/mixpanel'; import React, { FC } from 'react'; import { useInView } from 'react-cool-inview'; import { useAppStore } from 'src/store/app'; @@ -79,7 +79,7 @@ const Feed: FC = ({ feedType = PublicationSortCriteria.CuratedProfiles }) profileId: currentProfile?.id ?? null } }); - Hog.track(PAGINATION.EXPLORE_FEED); + Mixpanel.track(PAGINATION.EXPLORE_FEED); } }); diff --git a/src/components/Explore/FeedType.tsx b/src/components/Explore/FeedType.tsx index b72736fed548..6e51ad3d4ffa 100644 --- a/src/components/Explore/FeedType.tsx +++ b/src/components/Explore/FeedType.tsx @@ -7,7 +7,7 @@ import { SparklesIcon, SwitchHorizontalIcon } from '@heroicons/react/outline'; -import { Hog } from '@lib/hog'; +import { Mixpanel } from '@lib/mixpanel'; import clsx from 'clsx'; import { useRouter } from 'next/router'; import React, { Dispatch, FC, ReactNode } from 'react'; @@ -33,7 +33,7 @@ const FeedType: FC = ({ setFeedType, feedType }) => { onClick={() => { push({ query: { type: type.toLowerCase() } }); setFeedType(type); - Hog.track(`Switch to ${type.toLowerCase()} type in explore`); + Mixpanel.track(`Switch to ${type.toLowerCase()} type in explore`); }} className={clsx( { diff --git a/src/components/Explore/index.tsx b/src/components/Explore/index.tsx index eac12424c1b2..37d9e2313ded 100644 --- a/src/components/Explore/index.tsx +++ b/src/components/Explore/index.tsx @@ -4,7 +4,7 @@ import Trending from '@components/Home/Trending'; import Footer from '@components/Shared/Footer'; import Seo from '@components/utils/Seo'; import { PublicationSortCriteria } from '@generated/types'; -import { Hog } from '@lib/hog'; +import { Mixpanel } from '@lib/mixpanel'; import { NextPage } from 'next'; import { useRouter } from 'next/router'; import React, { useEffect, useState } from 'react'; @@ -30,7 +30,7 @@ const Explore: NextPage = () => { ); useEffect(() => { - Hog.track('Pageview', { path: PAGEVIEW.EXPLORE }); + Mixpanel.track('Pageview', { path: PAGEVIEW.EXPLORE }); }, []); return ( diff --git a/src/components/Home/Feed.tsx b/src/components/Home/Feed.tsx index 3e94fbf63f44..7a594216301a 100644 --- a/src/components/Home/Feed.tsx +++ b/src/components/Home/Feed.tsx @@ -10,7 +10,7 @@ import { CommentFields } from '@gql/CommentFields'; import { MirrorFields } from '@gql/MirrorFields'; import { PostFields } from '@gql/PostFields'; import { CollectionIcon } from '@heroicons/react/outline'; -import { Hog } from '@lib/hog'; +import { Mixpanel } from '@lib/mixpanel'; import React, { FC } from 'react'; import { useInView } from 'react-cool-inview'; import { useAppStore } from 'src/store/app'; @@ -69,7 +69,7 @@ const Feed: FC = () => { profileId: currentProfile?.id ?? null } }); - Hog.track(PAGINATION.HOME_FEED); + Mixpanel.track(PAGINATION.HOME_FEED); } }); diff --git a/src/components/Home/RecommendedProfiles.tsx b/src/components/Home/RecommendedProfiles.tsx index 51bbb0a493ed..3e099e9212a5 100644 --- a/src/components/Home/RecommendedProfiles.tsx +++ b/src/components/Home/RecommendedProfiles.tsx @@ -9,7 +9,7 @@ import { Profile } from '@generated/types'; import { ProfileFields } from '@gql/ProfileFields'; import { DotsCircleHorizontalIcon, UsersIcon } from '@heroicons/react/outline'; import { SparklesIcon } from '@heroicons/react/solid'; -import { Hog } from '@lib/hog'; +import { Mixpanel } from '@lib/mixpanel'; import React, { FC, useState } from 'react'; import { MISCELLANEOUS } from 'src/tracking'; @@ -87,7 +87,7 @@ const RecommendedProfiles: FC = () => { className="bg-gray-50 dark:bg-gray-900 hover:bg-gray-100 dark:hover:bg-gray-800 border-t dark:border-t-gray-700/80 text-sm w-full rounded-b-xl text-left px-5 py-3 flex items-center space-x-2 text-gray-600 dark:text-gray-300" onClick={() => { setShowSuggestedModal(true); - Hog.track(MISCELLANEOUS.OPEN_RECOMMENDED_PROFILES); + Mixpanel.track(MISCELLANEOUS.OPEN_RECOMMENDED_PROFILES); }} > diff --git a/src/components/Home/SetProfile.tsx b/src/components/Home/SetProfile.tsx index 5998d9bd9025..20a6ca26118f 100644 --- a/src/components/Home/SetProfile.tsx +++ b/src/components/Home/SetProfile.tsx @@ -1,7 +1,7 @@ import { Card, CardBody } from '@components/UI/Card'; import { MinusCircleIcon, PencilAltIcon, PhotographIcon } from '@heroicons/react/outline'; import { CheckCircleIcon } from '@heroicons/react/solid'; -import { Hog } from '@lib/hog'; +import { Mixpanel } from '@lib/mixpanel'; import clsx from 'clsx'; import Link from 'next/link'; import { FC } from 'react'; @@ -49,7 +49,7 @@ const SetProfile: FC = () => {
- Hog.track(MISCELLANEOUS.NAVIGATE_UPDATE_PROFILE)}> + Mixpanel.track(MISCELLANEOUS.NAVIGATE_UPDATE_PROFILE)}> Update profile here
diff --git a/src/components/Home/Trending.tsx b/src/components/Home/Trending.tsx index f634f38bf62e..afeabd196df1 100644 --- a/src/components/Home/Trending.tsx +++ b/src/components/Home/Trending.tsx @@ -4,7 +4,7 @@ import { Card, CardBody } from '@components/UI/Card'; import { ErrorMessage } from '@components/UI/ErrorMessage'; import { TagResult, TagSortCriteria } from '@generated/types'; import { TrendingUpIcon } from '@heroicons/react/solid'; -import { featureEnabled, Hog } from '@lib/hog'; +import { Mixpanel } from '@lib/mixpanel'; import nFormatter from '@lib/nFormatter'; import Link from 'next/link'; import React, { FC } from 'react'; @@ -31,19 +31,13 @@ const Title = () => { }; const Trending: FC = () => { - const isFeatureEnabled = featureEnabled('trending-widget'); const { data, loading, error } = useQuery(TRENDING_QUERY, { variables: { request: { limit: 7, sort: TagSortCriteria.MostPopular } }, - skip: !isFeatureEnabled, pollInterval: 10000 }); - if (!isFeatureEnabled) { - return null; - } - if (loading) { return ( <> @@ -73,7 +67,7 @@ const Trending: FC = () => {
Hog.track(MISCELLANEOUS.OPEN_TRENDING_TAG)} + onClick={() => Mixpanel.track(MISCELLANEOUS.OPEN_TRENDING_TAG)} >
{tag?.tag}
{nFormatter(tag?.total)} Publications
diff --git a/src/components/Home/index.tsx b/src/components/Home/index.tsx index 4d07d930bd08..77dfaf0adfb0 100644 --- a/src/components/Home/index.tsx +++ b/src/components/Home/index.tsx @@ -4,7 +4,7 @@ import Announcement from '@components/Home/Announcement'; import NewPost from '@components/Publication/New'; import Footer from '@components/Shared/Footer'; import Seo from '@components/utils/Seo'; -import { Hog } from '@lib/hog'; +import { Mixpanel } from '@lib/mixpanel'; import { NextPage } from 'next'; import React, { useEffect } from 'react'; import { useAppStore } from 'src/store/app'; @@ -20,7 +20,7 @@ import Trending from './Trending'; const Home: NextPage = () => { useEffect(() => { - Hog.track('Pageview', { path: PAGEVIEW.HOME }); + Mixpanel.track('Pageview', { path: PAGEVIEW.HOME }); }, []); const currentProfile = useAppStore((state) => state.currentProfile); diff --git a/src/components/Layout.tsx b/src/components/Layout.tsx index bcf4d69fac02..568ca47f0531 100644 --- a/src/components/Layout.tsx +++ b/src/components/Layout.tsx @@ -3,13 +3,13 @@ import { Profile } from '@generated/types'; import { ProfileFields } from '@gql/ProfileFields'; import getIsAuthTokensAvailable from '@lib/getIsAuthTokensAvailable'; import getToastOptions from '@lib/getToastOptions'; -import { posthogInit } from '@lib/hog'; import resetAuthData from '@lib/resetAuthData'; +import mixpanel from 'mixpanel-browser'; import Head from 'next/head'; import { useTheme } from 'next-themes'; import { FC, ReactNode, useEffect } from 'react'; import { Toaster } from 'react-hot-toast'; -import { CHAIN_ID } from 'src/constants'; +import { CHAIN_ID, MIXPANEL_API_HOST, MIXPANEL_TOKEN } from 'src/constants'; import { useAppPersistStore, useAppStore } from 'src/store/app'; import { useAccount, useDisconnect, useNetwork } from 'wagmi'; @@ -17,7 +17,13 @@ import Loading from './Loading'; import Navbar from './Shared/Navbar'; import useIsMounted from './utils/hooks/useIsMounted'; -posthogInit(); +if (MIXPANEL_TOKEN) { + mixpanel.init(MIXPANEL_TOKEN, { + ignore_dnt: true, + api_host: MIXPANEL_API_HOST, + batch_requests: false + }); +} export const USER_PROFILES_QUERY = gql` query UserProfiles($ownedBy: [EthereumAddress!]) { diff --git a/src/components/Notification/Icon.tsx b/src/components/Notification/Icon.tsx index a527cf133648..9d6451039441 100644 --- a/src/components/Notification/Icon.tsx +++ b/src/components/Notification/Icon.tsx @@ -1,6 +1,6 @@ import { gql, useQuery } from '@apollo/client'; import { LightningBoltIcon } from '@heroicons/react/outline'; -import { Hog } from '@lib/hog'; +import { Mixpanel } from '@lib/mixpanel'; import Link from 'next/link'; import { FC, useEffect, useState } from 'react'; import { useAppPersistStore, useAppStore } from 'src/store/app'; @@ -41,7 +41,7 @@ const NotificationIcon: FC = () => { onClick={() => { setNotificationCount(data?.notifications?.pageInfo?.totalCount); setShowBadge(false); - Hog.track(NOTIFICATION.OPEN); + Mixpanel.track(NOTIFICATION.OPEN); }} > diff --git a/src/components/Notification/List.tsx b/src/components/Notification/List.tsx index 48152593be67..bdef2217f242 100644 --- a/src/components/Notification/List.tsx +++ b/src/components/Notification/List.tsx @@ -8,7 +8,7 @@ import { CollectModuleFields } from '@gql/CollectModuleFields'; import { MetadataFields } from '@gql/MetadataFields'; import { ProfileFields } from '@gql/ProfileFields'; import { MailIcon } from '@heroicons/react/outline'; -import { Hog } from '@lib/hog'; +import { Mixpanel } from '@lib/mixpanel'; import { FC } from 'react'; import { useInView } from 'react-cool-inview'; import { useAppStore } from 'src/store/app'; @@ -173,7 +173,7 @@ const List: FC = () => { } } }); - Hog.track(PAGINATION.NOTIFICATION_FEED); + Mixpanel.track(PAGINATION.NOTIFICATION_FEED); } }); diff --git a/src/components/Notification/index.tsx b/src/components/Notification/index.tsx index 2546d9c35688..113d2feaba97 100644 --- a/src/components/Notification/index.tsx +++ b/src/components/Notification/index.tsx @@ -1,6 +1,6 @@ import Seo from '@components/utils/Seo'; import { LightningBoltIcon } from '@heroicons/react/outline'; -import { Hog } from '@lib/hog'; +import { Mixpanel } from '@lib/mixpanel'; import { FC, useEffect } from 'react'; import { APP_NAME } from 'src/constants'; import Custom404 from 'src/pages/404'; @@ -13,7 +13,7 @@ const Notification: FC = () => { const currentProfile = useAppStore((state) => state.currentProfile); useEffect(() => { - Hog.track('Pageview', { path: PAGEVIEW.NOTIFICATION }); + Mixpanel.track('Pageview', { path: PAGEVIEW.NOTIFICATION }); }, []); if (!currentProfile) { diff --git a/src/components/Pages/Contact.tsx b/src/components/Pages/Contact.tsx index 4673c970a524..6aadd0ee2c09 100644 --- a/src/components/Pages/Contact.tsx +++ b/src/components/Pages/Contact.tsx @@ -9,7 +9,7 @@ import { TextArea } from '@components/UI/TextArea'; import Seo from '@components/utils/Seo'; import { PencilAltIcon } from '@heroicons/react/outline'; import { CheckCircleIcon } from '@heroicons/react/solid'; -import { Hog } from '@lib/hog'; +import { Mixpanel } from '@lib/mixpanel'; import { useRouter } from 'next/router'; import React, { FC, useEffect } from 'react'; import { APP_NAME, CONTACT_EMAIL } from 'src/constants'; @@ -27,7 +27,7 @@ const newContactSchema = object({ const Contact: FC = () => { useEffect(() => { - Hog.track('Pageview', { path: PAGEVIEW.CONTACT }); + Mixpanel.track('Pageview', { path: PAGEVIEW.CONTACT }); }, []); const { push } = useRouter(); diff --git a/src/components/Pages/Privacy.tsx b/src/components/Pages/Privacy.tsx index 6bf51a0d8e6f..a2c0b12333e4 100644 --- a/src/components/Pages/Privacy.tsx +++ b/src/components/Pages/Privacy.tsx @@ -1,13 +1,13 @@ import Footer from '@components/Shared/Footer'; import Seo from '@components/utils/Seo'; -import { Hog } from '@lib/hog'; +import { Mixpanel } from '@lib/mixpanel'; import React, { FC, useEffect } from 'react'; import { APP_NAME } from 'src/constants'; import { PAGEVIEW } from 'src/tracking'; const Privacy: FC = () => { useEffect(() => { - Hog.track('Pageview', { path: PAGEVIEW.PRIVACY }); + Mixpanel.track('Pageview', { path: PAGEVIEW.PRIVACY }); }, []); return ( diff --git a/src/components/Pages/Thanks.tsx b/src/components/Pages/Thanks.tsx index 4f76f4aae60a..9f2f84375259 100644 --- a/src/components/Pages/Thanks.tsx +++ b/src/components/Pages/Thanks.tsx @@ -1,7 +1,7 @@ import Footer from '@components/Shared/Footer'; import Seo from '@components/utils/Seo'; import { HeartIcon } from '@heroicons/react/outline'; -import { Hog } from '@lib/hog'; +import { Mixpanel } from '@lib/mixpanel'; import { useTheme } from 'next-themes'; import React, { FC, Fragment, ReactNode, useEffect } from 'react'; import { APP_NAME, STATIC_ASSETS } from 'src/constants'; @@ -38,7 +38,7 @@ const Brand: FC = ({ name, logo, url, size, children }) => { const Thanks: FC = () => { useEffect(() => { - Hog.track('Pageview', { path: PAGEVIEW.THANKS }); + Mixpanel.track('Pageview', { path: PAGEVIEW.THANKS }); }, []); return ( diff --git a/src/components/Profile/Feed.tsx b/src/components/Profile/Feed.tsx index 8450c56aaa86..1a86e7f545f1 100644 --- a/src/components/Profile/Feed.tsx +++ b/src/components/Profile/Feed.tsx @@ -11,7 +11,7 @@ import { CommentFields } from '@gql/CommentFields'; import { MirrorFields } from '@gql/MirrorFields'; import { PostFields } from '@gql/PostFields'; import { CollectionIcon } from '@heroicons/react/outline'; -import { Hog } from '@lib/hog'; +import { Mixpanel } from '@lib/mixpanel'; import React, { FC } from 'react'; import { useInView } from 'react-cool-inview'; import { useAppStore } from 'src/store/app'; @@ -98,7 +98,7 @@ const Feed: FC = ({ profile, type }) => { profileId: currentProfile?.id ?? null } }); - Hog.track(PAGINATION.PROFILE_FEED); + Mixpanel.track(PAGINATION.PROFILE_FEED); } }); diff --git a/src/components/Profile/FeedType.tsx b/src/components/Profile/FeedType.tsx index 9c8a8753f743..d04ac40007e1 100644 --- a/src/components/Profile/FeedType.tsx +++ b/src/components/Profile/FeedType.tsx @@ -1,6 +1,6 @@ import { ProfileStats } from '@generated/types'; import { ChatAlt2Icon, FilmIcon, PencilAltIcon, PhotographIcon } from '@heroicons/react/outline'; -import { Hog } from '@lib/hog'; +import { Mixpanel } from '@lib/mixpanel'; import nFormatter from '@lib/nFormatter'; import clsx from 'clsx'; import React, { Dispatch, FC, ReactNode } from 'react'; @@ -24,7 +24,7 @@ const FeedType: FC = ({ stats, setFeedType, feedType }) => { type="button" onClick={() => { setFeedType(type); - Hog.track(`Switch to ${type.toLowerCase()} tab in profile`); + Mixpanel.track(`Switch to ${type.toLowerCase()} tab in profile`); }} className={clsx( { diff --git a/src/components/Profile/Followerings.tsx b/src/components/Profile/Followerings.tsx index 42d503800156..e24ed2f0dde9 100644 --- a/src/components/Profile/Followerings.tsx +++ b/src/components/Profile/Followerings.tsx @@ -1,8 +1,8 @@ import { Modal } from '@components/UI/Modal'; import { Profile } from '@generated/types'; import { UsersIcon } from '@heroicons/react/outline'; -import { Hog } from '@lib/hog'; import humanize from '@lib/humanize'; +import { Mixpanel } from '@lib/mixpanel'; import React, { FC, useState } from 'react'; import { PROFILE } from 'src/tracking'; @@ -24,7 +24,7 @@ const Followerings: FC = ({ profile }) => { className="text-left" onClick={() => { setShowFollowingModal(!showFollowingModal); - Hog.track(PROFILE.OPEN_FOLLOWING); + Mixpanel.track(PROFILE.OPEN_FOLLOWING); }} >
{humanize(profile?.stats?.totalFollowing)}
@@ -35,7 +35,7 @@ const Followerings: FC = ({ profile }) => { className="text-left" onClick={() => { setShowFollowersModal(!showFollowersModal); - Hog.track(PROFILE.OPEN_FOLLOWERS); + Mixpanel.track(PROFILE.OPEN_FOLLOWERS); }} >
{humanize(profile?.stats?.totalFollowers)}
diff --git a/src/components/Profile/Followers.tsx b/src/components/Profile/Followers.tsx index 9ec11074506a..a42ba396d968 100644 --- a/src/components/Profile/Followers.tsx +++ b/src/components/Profile/Followers.tsx @@ -8,7 +8,7 @@ import { Spinner } from '@components/UI/Spinner'; import { Follower, Profile } from '@generated/types'; import { ProfileFields } from '@gql/ProfileFields'; import { UsersIcon } from '@heroicons/react/outline'; -import { Hog } from '@lib/hog'; +import { Mixpanel } from '@lib/mixpanel'; import { FC } from 'react'; import { useInView } from 'react-cool-inview'; import { PAGINATION } from 'src/tracking'; @@ -57,7 +57,7 @@ const Followers: FC = ({ profile }) => { } } }); - Hog.track(PAGINATION.FOLLOWERS); + Mixpanel.track(PAGINATION.FOLLOWERS); } }); diff --git a/src/components/Profile/Following.tsx b/src/components/Profile/Following.tsx index 1c09edb6debf..eec428ef2133 100644 --- a/src/components/Profile/Following.tsx +++ b/src/components/Profile/Following.tsx @@ -7,7 +7,7 @@ import { Spinner } from '@components/UI/Spinner'; import { Following, Profile } from '@generated/types'; import { ProfileFields } from '@gql/ProfileFields'; import { UsersIcon } from '@heroicons/react/outline'; -import { Hog } from '@lib/hog'; +import { Mixpanel } from '@lib/mixpanel'; import { FC } from 'react'; import { useInView } from 'react-cool-inview'; import { PAGINATION } from 'src/tracking'; @@ -53,7 +53,7 @@ const Following: FC = ({ profile }) => { } } }); - Hog.track(PAGINATION.FOLLOWING); + Mixpanel.track(PAGINATION.FOLLOWING); } }); diff --git a/src/components/Profile/MutualFollowers/List.tsx b/src/components/Profile/MutualFollowers/List.tsx index 6ab21c094bed..bfab77d71783 100644 --- a/src/components/Profile/MutualFollowers/List.tsx +++ b/src/components/Profile/MutualFollowers/List.tsx @@ -5,7 +5,7 @@ import { ErrorMessage } from '@components/UI/ErrorMessage'; import { Spinner } from '@components/UI/Spinner'; import { Profile } from '@generated/types'; import { ProfileFields } from '@gql/ProfileFields'; -import { Hog } from '@lib/hog'; +import { Mixpanel } from '@lib/mixpanel'; import { FC } from 'react'; import { useInView } from 'react-cool-inview'; import { useAppStore } from 'src/store/app'; @@ -58,7 +58,7 @@ const MutualFollowersList: FC = ({ profileId }) => { } } }); - Hog.track(PAGINATION.MUTUAL_FOLLOWERS); + Mixpanel.track(PAGINATION.MUTUAL_FOLLOWERS); } }); diff --git a/src/components/Profile/MutualFollowers/index.tsx b/src/components/Profile/MutualFollowers/index.tsx index 8e82bb23a49c..cc0a8cace41e 100644 --- a/src/components/Profile/MutualFollowers/index.tsx +++ b/src/components/Profile/MutualFollowers/index.tsx @@ -3,7 +3,7 @@ import { Modal } from '@components/UI/Modal'; import { Profile } from '@generated/types'; import { UsersIcon } from '@heroicons/react/outline'; import getAvatar from '@lib/getAvatar'; -import { Hog } from '@lib/hog'; +import { Mixpanel } from '@lib/mixpanel'; import React, { FC, ReactNode, useState } from 'react'; import { useAppStore } from 'src/store/app'; import { PROFILE } from 'src/tracking'; @@ -62,7 +62,7 @@ const MutualFollowers: FC = ({ profile }) => { className="mr-0 sm:mr-10 text-sm text-gray-500 flex items-center space-x-2.5 cursor-pointer" onClick={() => { setShowMutualFollowersModal(true); - Hog.track(PROFILE.OPEN_MUTUAL_FOLLOWERS); + Mixpanel.track(PROFILE.OPEN_MUTUAL_FOLLOWERS); }} >
diff --git a/src/components/Profile/NFTFeed.tsx b/src/components/Profile/NFTFeed.tsx index 1650fd6d1168..dfe085456052 100644 --- a/src/components/Profile/NFTFeed.tsx +++ b/src/components/Profile/NFTFeed.tsx @@ -6,7 +6,7 @@ import { ErrorMessage } from '@components/UI/ErrorMessage'; import { Spinner } from '@components/UI/Spinner'; import { Nft, Profile } from '@generated/types'; import { CollectionIcon } from '@heroicons/react/outline'; -import { Hog } from '@lib/hog'; +import { Mixpanel } from '@lib/mixpanel'; import React, { FC } from 'react'; import { useInView } from 'react-cool-inview'; import { CHAIN_ID, IS_MAINNET } from 'src/constants'; @@ -64,7 +64,7 @@ const NFTFeed: FC = ({ profile }) => { } } }); - Hog.track(PAGINATION.NFT_FEED); + Mixpanel.track(PAGINATION.NFT_FEED); } }); diff --git a/src/components/Profile/New.tsx b/src/components/Profile/New.tsx index 587467677f52..96aad3ac861b 100644 --- a/src/components/Profile/New.tsx +++ b/src/components/Profile/New.tsx @@ -3,7 +3,7 @@ import Signup from '@components/Shared/Navbar/Login/New'; import SettingsHelper from '@components/Shared/SettingsHelper'; import { Card, CardBody } from '@components/UI/Card'; import Seo from '@components/utils/Seo'; -import { Hog } from '@lib/hog'; +import { Mixpanel } from '@lib/mixpanel'; import { NextPage } from 'next'; import React, { useEffect } from 'react'; import { APP_NAME } from 'src/constants'; @@ -15,7 +15,7 @@ const NewProfile: NextPage = () => { const currentProfile = useAppStore((state) => state.currentProfile); useEffect(() => { - Hog.track('Pageview', { path: PAGEVIEW.CREATE_PROFILE }); + Mixpanel.track('Pageview', { path: PAGEVIEW.CREATE_PROFILE }); }, []); if (!currentProfile) { diff --git a/src/components/Profile/index.tsx b/src/components/Profile/index.tsx index 274b4f858001..f7ab6077ee9a 100644 --- a/src/components/Profile/index.tsx +++ b/src/components/Profile/index.tsx @@ -1,7 +1,7 @@ import { gql, useQuery } from '@apollo/client'; import { GridItemEight, GridItemFour, GridLayout } from '@components/GridLayout'; import Seo from '@components/utils/Seo'; -import { Hog } from '@lib/hog'; +import { Mixpanel } from '@lib/mixpanel'; import { NextPage } from 'next'; import { useRouter } from 'next/router'; import React, { useEffect, useState } from 'react'; @@ -97,7 +97,7 @@ const ViewProfile: NextPage = () => { ); useEffect(() => { - Hog.track('Pageview', { path: PAGEVIEW.PROFILE }); + Mixpanel.track('Pageview', { path: PAGEVIEW.PROFILE }); }, []); const { data, loading, error } = useQuery(PROFILE_QUERY, { diff --git a/src/components/Publication/Actions/Collect/CollectModule.tsx b/src/components/Publication/Actions/Collect/CollectModule.tsx index 1027fbb1423f..b350422315c2 100644 --- a/src/components/Publication/Actions/Collect/CollectModule.tsx +++ b/src/components/Publication/Actions/Collect/CollectModule.tsx @@ -34,8 +34,8 @@ import { CheckCircleIcon } from '@heroicons/react/solid'; import formatAddress from '@lib/formatAddress'; import getSignature from '@lib/getSignature'; import getTokenImage from '@lib/getTokenImage'; -import { Hog } from '@lib/hog'; import humanize from '@lib/humanize'; +import { Mixpanel } from '@lib/mixpanel'; import onError from '@lib/onError'; import splitSignature from '@lib/splitSignature'; import dayjs from 'dayjs'; @@ -132,7 +132,7 @@ const CollectModule: FC = ({ count, setCount, publication }) => { setCount(count + 1); setHasCollectedByMe(true); toast.success('Transaction submitted successfully!'); - Hog.track(PUBLICATION.COLLECT_MODULE.COLLECT); + Mixpanel.track(PUBLICATION.COLLECT_MODULE.COLLECT); }; const { @@ -335,7 +335,7 @@ const CollectModule: FC = ({ count, setCount, publication }) => { type="button" onClick={() => { setShowCollectorsModal(!showCollectorsModal); - Hog.track(PUBLICATION.COLLECT_MODULE.OPEN_COLLECTORS); + Mixpanel.track(PUBLICATION.COLLECT_MODULE.OPEN_COLLECTORS); }} > {humanize(count)} collectors diff --git a/src/components/Publication/Actions/Collect/index.tsx b/src/components/Publication/Actions/Collect/index.tsx index 1936461dec4e..edd29a83b197 100644 --- a/src/components/Publication/Actions/Collect/index.tsx +++ b/src/components/Publication/Actions/Collect/index.tsx @@ -6,8 +6,8 @@ import { LensterPublication } from '@generated/lenstertypes'; import { CollectionIcon } from '@heroicons/react/outline'; import { CollectionIcon as CollectionIconSolid } from '@heroicons/react/solid'; import { getModule } from '@lib/getModule'; -import { Hog } from '@lib/hog'; import humanize from '@lib/humanize'; +import { Mixpanel } from '@lib/mixpanel'; import nFormatter from '@lib/nFormatter'; import { motion } from 'framer-motion'; import dynamic from 'next/dynamic'; @@ -48,7 +48,7 @@ const Collect: FC = ({ publication, isFullPublication }) => { whileTap={{ scale: 0.9 }} onClick={() => { setShowCollectModal(true); - Hog.track(PUBLICATION.COLLECT_MODULE.OPEN_COLLECT); + Mixpanel.track(PUBLICATION.COLLECT_MODULE.OPEN_COLLECT); }} aria-label="Collect" > diff --git a/src/components/Publication/Actions/Comment.tsx b/src/components/Publication/Actions/Comment.tsx index 793757994717..0703fee8510d 100644 --- a/src/components/Publication/Actions/Comment.tsx +++ b/src/components/Publication/Actions/Comment.tsx @@ -1,8 +1,8 @@ import { Tooltip } from '@components/UI/Tooltip'; import { LensterPublication } from '@generated/lenstertypes'; import { ChatAlt2Icon } from '@heroicons/react/outline'; -import { Hog } from '@lib/hog'; import humanize from '@lib/humanize'; +import { Mixpanel } from '@lib/mixpanel'; import nFormatter from '@lib/nFormatter'; import { motion } from 'framer-motion'; import { useRouter } from 'next/router'; @@ -34,7 +34,7 @@ const Comment: FC = ({ publication, isFullPublication }) => { if (currentProfile) { setParentPub(publication); setShowNewPostModal(true); - Hog.track(PUBLICATION.OPEN_COMMENT); + Mixpanel.track(PUBLICATION.OPEN_COMMENT); } else { push(`/posts/${publication.id}`); } diff --git a/src/components/Publication/Actions/Like.tsx b/src/components/Publication/Actions/Like.tsx index 3465f0dac9bb..dbdf6bcb500a 100644 --- a/src/components/Publication/Actions/Like.tsx +++ b/src/components/Publication/Actions/Like.tsx @@ -4,8 +4,8 @@ import { LensterPublication } from '@generated/lenstertypes'; import { Mutation, ReactionTypes } from '@generated/types'; import { HeartIcon } from '@heroicons/react/outline'; import { HeartIcon as HeartIconSolid } from '@heroicons/react/solid'; -import { Hog } from '@lib/hog'; import { publicationKeyFields } from '@lib/keyFields'; +import { Mixpanel } from '@lib/mixpanel'; import nFormatter from '@lib/nFormatter'; import onError from '@lib/onError'; import { motion } from 'framer-motion'; @@ -57,7 +57,7 @@ const Like: FC = ({ publication, isFullPublication }) => { const [addReaction] = useMutation(ADD_REACTION_MUTATION, { onCompleted: () => { - Hog.track(PUBLICATION.LIKE); + Mixpanel.track(PUBLICATION.LIKE); }, onError: (error) => { setLiked(!liked); @@ -69,7 +69,7 @@ const Like: FC = ({ publication, isFullPublication }) => { const [removeReaction] = useMutation(REMOVE_REACTION_MUTATION, { onCompleted: () => { - Hog.track(PUBLICATION.DISLIKE); + Mixpanel.track(PUBLICATION.DISLIKE); }, onError: (error) => { setLiked(!liked); diff --git a/src/components/Publication/Actions/Menu/Delete.tsx b/src/components/Publication/Actions/Menu/Delete.tsx index d225ef4fc039..857cbe7a4054 100644 --- a/src/components/Publication/Actions/Menu/Delete.tsx +++ b/src/components/Publication/Actions/Menu/Delete.tsx @@ -3,7 +3,7 @@ import { LensterPublication } from '@generated/lenstertypes'; import { Mutation } from '@generated/types'; import { Menu } from '@headlessui/react'; import { TrashIcon } from '@heroicons/react/outline'; -import { Hog } from '@lib/hog'; +import { Mixpanel } from '@lib/mixpanel'; import clsx from 'clsx'; import { useRouter } from 'next/router'; import React, { FC } from 'react'; @@ -23,7 +23,7 @@ const Delete: FC = ({ publication }) => { const { pathname, push } = useRouter(); const [hidePost] = useMutation(HIDE_POST_MUTATION, { onCompleted: () => { - Hog.track(PUBLICATION.DELETE); + Mixpanel.track(PUBLICATION.DELETE); pathname === '/posts/[id]' ? push('/') : location.reload(); } }); diff --git a/src/components/Publication/Actions/Menu/Embed.tsx b/src/components/Publication/Actions/Menu/Embed.tsx index 5b64f2a8a366..da633d7c743f 100644 --- a/src/components/Publication/Actions/Menu/Embed.tsx +++ b/src/components/Publication/Actions/Menu/Embed.tsx @@ -1,7 +1,7 @@ import { LensterPublication } from '@generated/lenstertypes'; import { Menu } from '@headlessui/react'; import { CodeIcon } from '@heroicons/react/outline'; -import { Hog } from '@lib/hog'; +import { Mixpanel } from '@lib/mixpanel'; import clsx from 'clsx'; import React, { FC } from 'react'; import { PUBLICATION } from 'src/tracking'; @@ -18,7 +18,7 @@ const Embed: FC = ({ publication }) => { clsx({ 'dropdown-active': active }, 'block px-4 py-1.5 text-sm m-2 rounded-lg cursor-pointer') } onClick={() => { - Hog.track(PUBLICATION.EMBED); + Mixpanel.track(PUBLICATION.EMBED); }} href={`https://embed.withlens.app/?url=${publication?.id}`} target="_blank" diff --git a/src/components/Publication/Actions/Menu/Permalink.tsx b/src/components/Publication/Actions/Menu/Permalink.tsx index 480c28d38306..ec7067c524f5 100644 --- a/src/components/Publication/Actions/Menu/Permalink.tsx +++ b/src/components/Publication/Actions/Menu/Permalink.tsx @@ -1,7 +1,7 @@ import { LensterPublication } from '@generated/lenstertypes'; import { Menu } from '@headlessui/react'; import { ClipboardCopyIcon } from '@heroicons/react/outline'; -import { Hog } from '@lib/hog'; +import { Mixpanel } from '@lib/mixpanel'; import clsx from 'clsx'; import React, { FC } from 'react'; import { CopyToClipboard } from 'react-copy-to-clipboard'; @@ -18,7 +18,7 @@ const Permalink: FC = ({ publication }) => { text={`${location.origin}/posts/${publication?.id}`} onCopy={() => { toast.success('Copied to clipboard!'); - Hog.track(PUBLICATION.PERMALINK); + Mixpanel.track(PUBLICATION.PERMALINK); }} > = ({ publication, isFullPublication }) => { { - Hog.track(PUBLICATION.MORE); + Mixpanel.track(PUBLICATION.MORE); }} aria-label="More" > diff --git a/src/components/Publication/Actions/Mirror.tsx b/src/components/Publication/Actions/Mirror.tsx index 4c7121b6dc5e..fc51599f8aed 100644 --- a/src/components/Publication/Actions/Mirror.tsx +++ b/src/components/Publication/Actions/Mirror.tsx @@ -11,9 +11,9 @@ import { } from '@gql/TypedAndDispatcherData/CreateMirror'; import { SwitchHorizontalIcon } from '@heroicons/react/outline'; import getSignature from '@lib/getSignature'; -import { Hog } from '@lib/hog'; import humanize from '@lib/humanize'; import { publicationKeyFields } from '@lib/keyFields'; +import { Mixpanel } from '@lib/mixpanel'; import nFormatter from '@lib/nFormatter'; import onError from '@lib/onError'; import splitSignature from '@lib/splitSignature'; @@ -60,7 +60,7 @@ const Mirror: FC = ({ publication, isFullPublication }) => { const onCompleted = () => { setMirrored(true); toast.success('Post has been mirrored!'); - Hog.track(PUBLICATION.MIRROR); + Mixpanel.track(PUBLICATION.MIRROR); }; const { isLoading: writeLoading, write } = useContractWrite({ diff --git a/src/components/Publication/Crowdfund/Fund.tsx b/src/components/Publication/Crowdfund/Fund.tsx index 9e8472f32a5d..f58d553710b7 100644 --- a/src/components/Publication/Crowdfund/Fund.tsx +++ b/src/components/Publication/Crowdfund/Fund.tsx @@ -10,7 +10,7 @@ import { LensterCollectModule, LensterPublication } from '@generated/lenstertype import { CreateCollectBroadcastItemResult, Mutation } from '@generated/types'; import { CashIcon } from '@heroicons/react/outline'; import getSignature from '@lib/getSignature'; -import { Hog } from '@lib/hog'; +import { Mixpanel } from '@lib/mixpanel'; import onError from '@lib/onError'; import splitSignature from '@lib/splitSignature'; import React, { Dispatch, FC, useState } from 'react'; @@ -98,7 +98,7 @@ const Fund: FC = ({ fund, collectModule, setRevenue, revenue }) => { const onCompleted = () => { setRevenue(revenue + parseFloat(collectModule?.amount?.value)); toast.success('Transaction submitted successfully!'); - Hog.track(CROWDFUND.FUND); + Mixpanel.track(CROWDFUND.FUND); }; const { diff --git a/src/components/Publication/Crowdfund/index.tsx b/src/components/Publication/Crowdfund/index.tsx index 36cdc42a0bf0..c487e8d7b34d 100644 --- a/src/components/Publication/Crowdfund/index.tsx +++ b/src/components/Publication/Crowdfund/index.tsx @@ -11,8 +11,8 @@ import { LensterPublication } from '@generated/lenstertypes'; import { CashIcon, CurrencyDollarIcon, UsersIcon } from '@heroicons/react/outline'; import getIPFSLink from '@lib/getIPFSLink'; import getTokenImage from '@lib/getTokenImage'; -import { Hog } from '@lib/hog'; import imagekitURL from '@lib/imagekitURL'; +import { Mixpanel } from '@lib/mixpanel'; import clsx from 'clsx'; import React, { FC, ReactNode, useEffect, useState } from 'react'; import { STATIC_ASSETS } from 'src/constants'; @@ -109,7 +109,7 @@ const Crowdfund: FC = ({ fund }) => { className="text-sm" onClick={() => { setShowFundersModal(!showFundersModal); - Hog.track(CROWDFUND.OPEN_FUNDERS); + Mixpanel.track(CROWDFUND.OPEN_FUNDERS); }} > { onClick={() => { setParentPub(null); setShowNewPostModal(!showNewPostModal); - Hog.track(PUBLICATION.OPEN_NEW); + Mixpanel.track(PUBLICATION.OPEN_NEW); }} > diff --git a/src/components/Publication/New/index.tsx b/src/components/Publication/New/index.tsx index 672e6c118e7e..6d56b84ab0d5 100644 --- a/src/components/Publication/New/index.tsx +++ b/src/components/Publication/New/index.tsx @@ -20,7 +20,7 @@ import { PencilAltIcon } from '@heroicons/react/outline'; import { defaultFeeData, defaultModuleData, getModule } from '@lib/getModule'; import getSignature from '@lib/getSignature'; import getTags from '@lib/getTags'; -import { Hog } from '@lib/hog'; +import { Mixpanel } from '@lib/mixpanel'; import onError from '@lib/onError'; import splitSignature from '@lib/splitSignature'; import trimify from '@lib/trimify'; @@ -81,7 +81,7 @@ const NewPost: FC = ({ setShowModal, hideCard = false }) => { setAttachments([]); setSelectedModule(defaultModuleData); setFeeData(defaultFeeData); - Hog.track(POST.NEW); + Mixpanel.track(POST.NEW); }; const { diff --git a/src/components/Publication/PublicationStats.tsx b/src/components/Publication/PublicationStats.tsx index 5f6bfbf212e9..4577a0b1022c 100644 --- a/src/components/Publication/PublicationStats.tsx +++ b/src/components/Publication/PublicationStats.tsx @@ -4,7 +4,7 @@ import Mirrors from '@components/Shared/Modal/Mirrors'; import { Modal } from '@components/UI/Modal'; import { LensterPublication } from '@generated/lenstertypes'; import { CollectionIcon, HeartIcon, SwitchHorizontalIcon } from '@heroicons/react/outline'; -import { Hog } from '@lib/hog'; +import { Mixpanel } from '@lib/mixpanel'; import nFormatter from '@lib/nFormatter'; import React, { FC, useState } from 'react'; import { PUBLICATION } from 'src/tracking'; @@ -37,7 +37,7 @@ const PublicationStats: FC = ({ publication }) => {