Skip to content
This repository has been archived by the owner on Jun 10, 2024. It is now read-only.

feat(ga): added save scene actions and new account creation #384

Merged
merged 8 commits into from
Mar 13, 2024

Conversation

rostyslavvnahornyi
Copy link
Collaborator

No description provided.

Copy link

netlify bot commented Jan 22, 2024

Deploy Preview for 3dstreet-editor-builds ready!

Name Link
🔨 Latest commit f342bba
🔍 Latest deploy log https://app.netlify.com/sites/3dstreet-editor-builds/deploys/65f21823425bd10008fafc60
😎 Deploy Preview https://deploy-preview-384--3dstreet-editor-builds.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@kfarr
Copy link
Contributor

kfarr commented Feb 4, 2024

Reviewing the code first, it looks like there is a bit more process around sign-in now so that we can do a query to see if a user is logging in for the first time therefore creating an account

@kfarr
Copy link
Contributor

kfarr commented Feb 4, 2024

updated from master

other questions:

  • which google analytics key -- I assume that is tied to the environment credentials dev vs. prod

how to test?

  • stub the google analytics calls with console.log (or add that)
  • try logging in with a new google account (or delete that account on the dev server)
  • is there a way to view events being sent live on google analytics for debugging? use save / save as to test that

https://firebase.google.com/docs/analytics/debugview#web

@kfarr
Copy link
Contributor

kfarr commented Feb 4, 2024

I started testing using the extension suggested above. It confirmed that we were sending events, but not to the development account as expected from the current environment file.

Then I identified that we're still loading GA via index.html
https://github.com/3DStreet/3dstreet-editor/blob/master/index.html#L130

Instead we should instantiate google analytics via react / javascript so that we can use env credential.
#390

Please make these changes on this very PR so we can keep all the google analytics changes together

@rostyslavvnahornyi
Copy link
Collaborator Author

hi @kfarr !

ive added ga via npm package react-ga4 and created new variable in envs "GA_ID". For development im using my GA_ID that i have created before. For production we need to use old GA_ID that stored in index.js at the end of the file.

Also i changed all sending events from native js to sendMetrick() function. Here i ran into a problem that all my click events were not sent to ga servers in local development due to adblockers.  So, If you want to test ga in local just remove all adblockers.

This is the example of metric(export gltf):
image
image

@kfarr
Copy link
Contributor

kfarr commented Mar 13, 2024

looks great @rostyslavvnahornyi thanks for this and sorry for delayed review

@kfarr kfarr merged commit 6a2cbab into master Mar 13, 2024
4 checks passed
@kfarr kfarr deleted the feat/issue-324/ga-events branch March 13, 2024 21:32
@kfarr kfarr mentioned this pull request Mar 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants