Skip to content

Commit

Permalink
refactor: rename function to fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
flsilva committed Feb 6, 2024
1 parent ca1dfa5 commit 244044d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/features/shared/routing/GoogleAnalytics.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useEffect } from 'react';
import { usePathname, useSearchParams } from 'next/navigation';
import Script from 'next/script';

export const gaPageWiew = (id: string, url: string) => {
export const gaPageView = (id: string, url: string) => {
if (!window.gtag) return;
window.gtag('config', id, {
page_path: url,
Expand All @@ -30,7 +30,7 @@ export const useGaNextNavigation = ({ gaId }: GaNextNavigationProps) => {

useEffect(() => {
const url = `${pathname}${searchParams.toString() !== '' ? `?${searchParams}` : ''}`;
gaPageWiew(gaId, url);
gaPageView(gaId, url);
}, [gaId, pathname, searchParams]);
};

Expand Down

0 comments on commit 244044d

Please sign in to comment.