Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

Commit

Permalink
Vercel の Production 環境でのみ Google Analytics にイベントを送信する
Browse files Browse the repository at this point in the history
  • Loading branch information
calmery committed Nov 9, 2020
1 parent e766aca commit 871915a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/google-analytics.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const GOOGLE_ANALYTICS_ID = process.env.NEXT_PUBLIC_GOOGLE_ANALYTICS_ID;
// Helper Functions

const gtag = () => {
if (process.env.NODE_ENV === "production") {
if (process.env.NEXT_PUBLIC_VERCEL_ENV === "production") {
return (window as any).gtag;
}

Expand Down

0 comments on commit 871915a

Please sign in to comment.