Skip to content

Commit ebce670

Browse files
committed
move analytics to ssr false
1 parent 76b6f44 commit ebce670

File tree

6 files changed

+12
-1
lines changed

6 files changed

+12
-1
lines changed

examples/logic/analytics.ts renamed to examples/ideas/Analytics.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,7 @@ if (IS_PROD && !IS_LOCAL) {
88
api_host: "https://app.posthog.com",
99
});
1010
}
11+
12+
export default function Analytics() {
13+
return null;
14+
}

examples/pages/_app.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import type { AppProps } from "next/app";
22
import Head from "next/head";
3-
import "../logic/analytics";
43

54
function MyApp({ Component, pageProps }: AppProps) {
65
return (

examples/worlds/Hub.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
import { LostWorld, StandardReality, Image } from "spacesvr";
22
import Link from "../ideas/Link";
33
import Title from "../ideas/Title";
4+
import Analytics from "../ideas/Analytics";
45

56
export default function Hub() {
67
return (
78
<StandardReality
89
environmentProps={{ dev: process.env.NODE_ENV === "development" }}
910
>
11+
<Analytics />
1012
<LostWorld />
1113
<group position-z={-1.5}>
1214
<Title

examples/worlds/Media.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import Link from "../ideas/Link";
33
import Title from "../ideas/Title";
44
import Test from "../ideas/Text";
55
import { useState } from "react";
6+
import Analytics from "../ideas/Analytics";
67

78
export default function Media() {
89
const MODELS = [
@@ -21,6 +22,7 @@ export default function Media() {
2122

2223
return (
2324
<StandardReality>
25+
<Analytics />
2426
<LostWorld />
2527
<Title position-z={-1.5} position-y={1.2}>
2628
welcome to the media world

examples/worlds/Multiplayer/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@ import LightSwitch from "./ideas/LightSwitch";
33
import PingPongMulti from "./ideas/PingPongMulti";
44
import Title from "../../ideas/Title";
55
import Link from "../../ideas/Link";
6+
import Analytics from "../../ideas/Analytics";
67

78
export default function Multiplayer() {
89
return (
910
<StandardReality
1011
playerProps={{ pos: [5, 1, 0], rot: Math.PI }}
1112
networkProps={{ autoconnect: true, voice: true }}
1213
>
14+
<Analytics />
1315
<Title position-z={-1.5} position-y={1.2}>
1416
welcome to the multiplayer world
1517
</Title>

examples/worlds/Workshop.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
} from "spacesvr";
1111
import Title from "../ideas/Title";
1212
import Link from "../ideas/Link";
13+
import Analytics from "../ideas/Analytics";
1314

1415
export default function Workshop() {
1516
const [value, setValue] = useState("hello world");
@@ -40,6 +41,7 @@ export default function Workshop() {
4041

4142
return (
4243
<StandardReality>
44+
<Analytics />
4345
<LostWorld />
4446
<group position-z={-2} position-x={-1}>
4547
<Title position-y={1.2}>welcome to the workshop</Title>

0 commit comments

Comments
 (0)