Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

revert earlier pr

Inian Parameshwaran6b5a4756cdcf
diff --git a/vercel-local.json b/vercel-local.json
index a1f26d1fde5..9afdef4d9bb 100644
--- a/vercel-local.json
+++ b/vercel-local.json
@@ -4,10 +4,6 @@
{ "source": "/", "destination": "http://localhost:3000/new" },
{ "source": "/beta", "destination": "http://localhost:3000/new/beta" },
{ "source": "/:name.:extension", "destination": "http://localhost:3005/:name.:extension" },
- {
- "source": "/:asset/:name.:extension",
- "destination": "http://localhost:3005/:asset/:name.:extension"
- },
{ "source": "/:match*", "destination": "http://localhost:3005/:match*/" }
],
"redirects": [
diff --git a/web/docusaurus.config.js b/web/docusaurus.config.js
index 0f916ad027d..beec065a5ad 100755
--- a/web/docusaurus.config.js
+++ b/web/docusaurus.config.js
@@ -47,6 +47,9 @@ module.exports = {
},
image: '/img/supabase-og-image.png', // used for meta tag, in particular og:image and twitter:image
metaImage: '/img/supabase-og-image.png',
+ googleAnalytics: {
+ trackingID: 'UA-155232740-1',
+ },
navbar: {
// classNames: 'shadow--md',
// title: 'supabase',
@@ -241,7 +244,6 @@ module.exports = {
},
],
],
- scripts: [{ src: '/scripts/telemetry.js' }],
// plugins: [
// // [
// // '@docusaurus/plugin-content-docs',
diff --git a/www/pages/_app.tsx b/www/pages/_app.tsx
index 890778ceeeb..6ac887c0430 100644
--- a/www/pages/_app.tsx
+++ b/www/pages/_app.tsx
@@ -1,39 +1,6 @@
import { AppProps } from 'next/app'
-import { useRouter } from 'next/router'
-import { useEffect } from 'react'
import '../styles/index.css'
-import { post } from './../lib/fetchWrapper'
export default function MyApp({ Component, pageProps }: AppProps) {
- const router = useRouter()
-
- function telemetry() {
- return post(`https://app.supabase.io/api/telemetry/page`, {
- referrer: document.referrer,
- title: document.title,
- })
- }
-
- useEffect(() => {
- // `routeChangeComplete` won't run for the first page load unless the query string is
- // hydrated later on, so here we log a page view if this is the first render and
- // there's no query string
- if (!router.asPath.includes('?')) {
- telemetry()
- }
- }, [])
-
- useEffect(() => {
- function handleRouteChange() {
- telemetry()
- }
-
- // Listen for page changes after a navigation or when the query changes
- router.events.on('routeChangeComplete', handleRouteChange)
- return () => {
- router.events.off('routeChangeComplete', handleRouteChange)
- }
- }, [router.events])
-
return <Component {...pageProps} />
}
diff --git a/www/pages/_document.tsx b/www/pages/_document.tsx
index 4ae1cf1f573..cef2c8476ad 100644
--- a/www/pages/_document.tsx
+++ b/www/pages/_document.tsx
@@ -11,7 +11,19 @@ export default class MyDocument extends Document {
render() {
return (
<Html lang="en" className="dark">
- <Head></Head>
+ <Head>
+ <script
+ dangerouslySetInnerHTML={{
+ __html: `(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+ })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
+
+ ga('create', 'UA-155232740-1', 'auto');
+ ga('send', 'pageview');`,
+ }}
+ />
+ </Head>
<body>
<Main />
<NextScript />