ブログを追加して利用を開始しましょう
50 |( 7 | WrappedComponent: React.ComponentType
,
8 | options: FieldsObject = {}
9 | ) => {
10 | const trackPage = (page: string) => {
11 | ReactGA.set({ page, ...options });
12 | ReactGA.pageview(page);
13 | };
14 |
15 | return (props: P) => {
16 | useEffect(() => {
17 | trackPage(props.location.pathname);
18 | }, [props.location.pathname]);
19 |
20 | return