Add Google Analytics - Cloud


The themeconfig.json file is used to add Google Analytics to your Magellan site.

  1. Follow these instructions from Google: Set up Analytics for a website and/or app.
    1. When adding your data stream, select Web.
      GA4 Set up data stream - Web
    2. Enter your book URL in the Website URL field.
    3. After you’ve clicked Create Stream, your web stream details will display on screen.
    4. Copy your Measurement ID (G-XXXXXXXXXX). You’ll paste this ID into your themeconfig.json file later.
  2. Open Files from the Primary navigation.
  3. Go to <your theme name> top-level folder.
  4. Open your themeconfig.json file in a text editor.
  5. Add the following code to your file.
    1. In the first object, copy and paste this code and replace the G-XXXXXXXXXX with your Measurement ID:

“analyticsGA4ID” : “<G-XXXXXXXXXX>”,

  1. In the config object, copy and paste this code:

"googleAnalytics": {
"defaultValue": true

  1. Save your themeconfig.json file and reupload it.


Themeconfig file with google analytics element