Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor usage of googleAnalytics hook #612

Open
daileytj opened this issue Dec 19, 2022 · 2 comments
Open

Refactor usage of googleAnalytics hook #612

daileytj opened this issue Dec 19, 2022 · 2 comments
Labels
brightlayer-ui Used to identify Brightlayer UI platform issues for easy filtering enhancement Request for improvement or new feature

Comments

@daileytj
Copy link
Contributor

Describe the desired behavior

Move the useGoogleAnalytics hook from every page to the router so we don't need to use the GA hook on every page

Describe the current behavior

useGoogleAnalytics hook is being called on every page

Is this request related to a current issue?

Additional Context

In doc-it, the useGoogleAnalytics hook is used on each page (or in the markdown page wrapper component) to call GA with 'pageviews'. This works fine. Dev-docs is configured so that we don't need to do this on every page, we can actually just have it in one place in a useEffect hook in the router (any time the route changes, we trigger a page view).

@daileytj daileytj added enhancement Request for improvement or new feature needs-review Issues that we would like to revisit/review labels Dec 19, 2022
@huayunh
Copy link
Contributor

huayunh commented Dec 19, 2022

might be associated with #514 (Or maybe not... I don't know)

@daileytj
Copy link
Contributor Author

Ensure that this still works with the global search as well as the icons search because these trigger a pageview to track what the end user is searching for.

@joebochill joebochill added the brightlayer-ui Used to identify Brightlayer UI platform issues for easy filtering label Jan 5, 2023
@joebochill joebochill removed the needs-review Issues that we would like to revisit/review label Jan 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
brightlayer-ui Used to identify Brightlayer UI platform issues for easy filtering enhancement Request for improvement or new feature
Development

No branches or pull requests

3 participants