-
Notifications
You must be signed in to change notification settings - Fork 2
Story/google analytics #48
Changes from 1 commit
0dd78d6
97399e5
313efed
c9d570a
3289075
6c413d4
a86cdcf
a1abfae
086b739
c46c839
75ddf5a
28e00ed
7efcc45
f43c905
9085396
35aeb4c
5d0a4db
f03c4d8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ const renderApp = (Div, lang, pagetitle, endpoint, gaid) => { | |
const ga4react = new GA4React(gaid); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need to create a new GA4React object every time the app is re-rendered (i.e. could we put this line outside of the renderApp function)? Not too familiar with how GA4React works, so I'm just wondering. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right now we are getting the gaid attribute within the render app which is why I put this here. I guess we could make the assumption that the user won't change their gaid so we wouldn't need to observe for it? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmmm that's a good point— I guess we can keep it how it is just in case? |
||
(async () => { | ||
await ga4react | ||
.initialize({ send_page_view: false }) | ||
.initialize() | ||
.then((res) => console.log(`Analytics Success: ${res} ${gaid}`)) | ||
.catch((err) => console.log(`Analytics Failure: ${err}`)) | ||
.finally(() => { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be
en(screen.title, { page: pagetitle })
(same for other one) bc of the string interpolation in our translation config.