MUI Extended UI Components

Google Analytics


Adds Google Analytics to a WebPage

Usage

  • Step 1

    import { GoogleAnalytics } from "mui-extended"; const myPage = () => { return ( <> <GoogleAnalytics /> {/* Page Content */} </> ); };
  • Step 2.
    Enable and collect Analitics Id in Google Analytics Account.
    Refer Google Support for help.

  • Step 3.
    set environmental variable

    NEXT_PUBLIC_GOOGLE_ANALYTICS_ID
    to id obtained from Google Analytics.

Does this page need improvements?
Edit This Page in GitHub
Did this page help you?
Provide feedback in the GitHub Discussion Page
Need More help?

Write an email to opensource@sodaru.com