Skip to content

Commit

Permalink
Add SEO
Browse files Browse the repository at this point in the history
  • Loading branch information
SecretSaturn committed Aug 23, 2024
1 parent 0af3fd8 commit da2ed90
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/pages/analytics/Analytics.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useEffect, useContext } from 'react'
import { APIContext } from 'context/APIContext'
import { Helmet } from 'react-helmet-async'
import { trackMixPanelEvent, dashboardPageTitle, dashboardPageDescription, dashboardJsonLdSchema } from 'utils/commons'
import { trackMixPanelEvent, analyticsPageTitle, analyticsPageDescription, analyticsJsonLdSchema } from 'utils/commons'
import UnbondingsChart from './components/UnbondingsChart'
import AccountsChart from './components/AccountsChart'

Expand All @@ -15,25 +15,25 @@ function Analytics() {
return (
<>
<Helmet>
<title>{dashboardPageTitle}</title>
<title>{analyticsPageTitle}</title>

<meta charSet="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<meta name="title" content={dashboardPageTitle} />
<meta name="application-name" content={dashboardPageTitle} />
<meta name="description" content={dashboardPageDescription} />
<meta name="title" content={analyticsPageTitle} />
<meta name="application-name" content={analyticsPageTitle} />
<meta name="description" content={analyticsPageDescription} />
<meta name="robots" content="index,follow" />

<meta property="og:title" content={dashboardPageTitle} />
<meta property="og:description" content={dashboardPageDescription} />
<meta property="og:title" content={analyticsPageTitle} />
<meta property="og:description" content={analyticsPageDescription} />
{/* <meta property='og:image' content='Image URL Here'/> */}

<meta name="twitter:title" content={dashboardPageTitle} />
<meta name="twitter:description" content={dashboardPageDescription} />
<meta name="twitter:title" content={analyticsPageTitle} />
<meta name="twitter:description" content={analyticsPageDescription} />
{/* <meta name='twitter:image' content='Image URL Here'/> */}

<script type="application/ld+json">{JSON.stringify(dashboardJsonLdSchema)}</script>
<script type="application/ld+json">{JSON.stringify(analyticsJsonLdSchema)}</script>
</Helmet>
<div className="px-4 mx-auto space-y-4 w-full">
<div className="grid grid-cols-12 gap-4">
Expand Down
15 changes: 15 additions & 0 deletions src/utils/commons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,21 @@ export const dashboardJsonLdSchema = [
}
]

// Analytics
export const analyticsPageTitle = `${pageTitle} | Analytics`
export const analyticsPageDescription = `Various Analytics for the Secret Network`
export const analyticsJsonLdSchema = [
{
'@context': 'http://schema.org',
'@type': 'WebPage',
url: 'https://dash.scrt.network/analytics',
name: `${pageTitle} | Analytics`,
alternateName: `${alternatePageTitle} | Analytics`,
description: analyticsPageDescription,
creator: 'Secret Jupiter, Secret Saturn'
}
]

// IBC
export const ibcPageTitle = `${pageTitle} | IBC Transfer`
export const ibcPageDescription = `Deposit your assets, such as SCRT, via IBC transfer to and from Secret Network`
Expand Down

0 comments on commit da2ed90

Please sign in to comment.