diff --git a/web/pages/analytics.tsx b/web/pages/analytics.tsx index 0afd5a3e..b78c2105 100644 --- a/web/pages/analytics.tsx +++ b/web/pages/analytics.tsx @@ -86,7 +86,7 @@ export default function Analytics(props: { ) } -function CustomAnalytics(props: { +export function CustomAnalytics(props: { startDate: number monthlyActiveUsers: number[] dailyActiveUsers: number[] @@ -104,27 +104,27 @@ function CustomAnalytics(props: { } = props return ( <Col> - <Title text="Monthly Active users" /> + <Title text="Monthly Active Users" /> <DailyCountChart dailyCounts={monthlyActiveUsers} startDate={startDate} /> - <Title text="Daily Active users" /> + <Title text="Daily Active Users" /> <DailyCountChart dailyCounts={dailyActiveUsers} startDate={startDate} /> - <Title text="Bets count" /> + <Title text="Trades" /> <DailyCountChart dailyCounts={dailyBetCounts} startDate={startDate} small /> - <Title text="Markets count" /> + <Title text="Markets created" /> <DailyCountChart dailyCounts={dailyContractCounts} startDate={startDate} small /> - <Title text="Comments count" /> + <Title text="Comments" /> <DailyCountChart dailyCounts={dailyCommentCounts} startDate={startDate} @@ -134,7 +134,7 @@ function CustomAnalytics(props: { ) } -function FirebaseAnalytics() { +export function FirebaseAnalytics() { // Edit dashboard at https://datastudio.google.com/u/0/reporting/faeaf3a4-c8da-4275-b157-98dad017d305/page/Gg3/edit return ( <iframe diff --git a/web/pages/embed/[username]/[contractSlug].tsx b/web/pages/embed/[username]/[contractSlug].tsx index afbd81a5..72ceea93 100644 --- a/web/pages/embed/[username]/[contractSlug].tsx +++ b/web/pages/embed/[username]/[contractSlug].tsx @@ -80,7 +80,7 @@ function ContractEmbed(props: { contract: Contract; bets: Bet[] }) { return ( <Col className="w-full flex-1 bg-white py-2"> - <div className="px-3 text-xl text-indigo-700"> + <div className="px-3 text-xl md:text-2xl text-indigo-700"> <Linkify text={question} /> </div> diff --git a/web/pages/embed/analytics.tsx b/web/pages/embed/analytics.tsx new file mode 100644 index 00000000..806b6e64 --- /dev/null +++ b/web/pages/embed/analytics.tsx @@ -0,0 +1,27 @@ +import { Col } from '../../components/layout/col' +import { Spacer } from '../../components/layout/spacer' +import { fromPropz } from '../../hooks/use-propz' +import { + CustomAnalytics, + FirebaseAnalytics, + getStaticPropz, +} from '../analytics' + +export const getStaticProps = fromPropz(getStaticPropz) + +export default function AnalyticsEmbed(props: { + startDate: number + dailyActiveUsers: number[] + dailyBetCounts: number[] + dailyContractCounts: number[] + dailyCommentCounts: number[] + monthlyActiveUsers: number[] +}) { + return ( + <Col className="w-full px-2 bg-white"> + <CustomAnalytics {...props} /> + <Spacer h={8} /> + <FirebaseAnalytics /> + </Col> + ) +}