Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
✨ 해당 이슈 번호 ✨
closed #543
todo
📌 내가 알게 된 부분
react-ga4
라이브러리를 사용해주었습니다.배포시 포함되어야하기 때문에
dependencies
로 설치해주었어요react의 경우
SPA
구조이기 때문에 각 페이지의 html마다 코드를 주입해주는 방법을 사용하지 않고,useLocation
을 사용해서 위치의 변경을 인식할 때마다 정보를 날려주는 방식으로 구현했습니다.RouteTracker.tsx
원래는 유틸 함수처럼 만들고 App.tsx 상위에서 호출했으나, 구글링해보니 BrowseRouter 외부에서 호출된다는 에러가 뜬다고 해서 RouteTracker 라는 컴포넌트를 만들고 RouteProvider 하위에서 호출해주었습니다.
작동이 한 번에 되면 좋겠지만 .. 동헌오빠랑 계속 확인해보면서 코드를 고쳐가야 할 것 같습니당
📌 질문할 부분
📌스크린샷(선택)