Skip to content

Commit

Permalink
Merge pull request #601 from 3DStreet/posthog-import
Browse files Browse the repository at this point in the history
Posthog import
  • Loading branch information
kfarr authored Jun 14, 2024
2 parents a664d19 + 50b7419 commit b2be856
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 4 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@

<a-entity id="environment" data-layer-name="Environment" street-environment="preset: day;"></a-entity>

<a-entity id="cameraRig" data-layer-name="Viewer" cursor-teleport="cameraRig: #cameraRig; cameraHead: #camera;"
<a-entity id="cameraRig" class="ph-no-capture" data-layer-name="Viewer" cursor-teleport="cameraRig: #cameraRig; cameraHead: #camera;"
look-controls="reverseMouseDrag: true" wasd-controls="enabled: true">
<a-entity id="camera" camera="far: 1000" position="0 1.6 0"></a-entity>
<a-entity id="leftHand" hand-controls="hand: left;"
Expand Down
24 changes: 24 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"date-fns": "^2.30.0",
"firebase": "^9.23.0",
"lodash-es": "^4.17.21",
"posthog-js": "^1.138.3",
"prop-types": "^15.8.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down Expand Up @@ -108,4 +109,4 @@
"prettier --write"
]
}
}
}
6 changes: 6 additions & 0 deletions src/editor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { Viewport } from './lib/viewport';
import { firebaseConfig } from './services/firebase.js';
import './style/index.scss';
import ReactGA from 'react-ga4';
import posthog from 'posthog-js';

function Inspector() {
this.assetsLoader = new AssetsLoader();
Expand Down Expand Up @@ -329,4 +330,9 @@ Inspector.prototype = {
ReactGA.initialize(firebaseConfig.measurementId);
const inspector = (AFRAME.INSPECTOR = new Inspector());

posthog.init('phc_Yclai3qykyFi8AEFOrZsh6aS78SSooLzpDz9wQ9YAH9', {
api_host: 'https://us.i.posthog.com',
person_profiles: 'identified_only' // or 'always' to create profiles for anonymous users as well
});

export { inspector };
4 changes: 2 additions & 2 deletions webpack.prod.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ const DEPLOY_ENV = process.env.DEPLOY_ENV ?? 'production';

module.exports = {
performance: {
maxAssetSize: 1572864, // 1.5 MiB
maxEntrypointSize: 1572864, // 1.5 MiB
maxAssetSize: 1677722, // 1.6 MiB
maxEntrypointSize: 1677722, // 1.6 MiB
hints: 'error'
},
mode: 'production',
Expand Down

0 comments on commit b2be856

Please sign in to comment.