Created embed page for analytics
This commit is contained in:
parent
087a2a1f8f
commit
ee6f91a52f
|
@ -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
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
27
web/pages/embed/analytics.tsx
Normal file
27
web/pages/embed/analytics.tsx
Normal file
|
@ -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>
|
||||
)
|
||||
}
|
Loading…
Reference in New Issue
Block a user