Google Analytics

This feature enables Google Analytics. To enable this feature, follow the steps in each section below.

Generate Google Analytics Tracking ID

This feature requires a Tracking ID. To generate a Tracking ID, follow the steps below:

  1. Visit and create an account
  2. When your account is created, log in
  3. Select the site you wish to obtain the tracking ID for
  4. Visit Tracking ID and copy the text underneath Tracking ID and keep it safe

Add Your Configuration

This feature requires configuration, these requirements are detailed below:

Option Note
var trackingID = "TRACKINGID"; Your Tracking ID

To add your configuration, follow the steps below:

  1. Locate the theme folder. Example: /ghost/content/themes/ghost-theme/
  2. Open partials/google-analytics.hbs
  3. Add your configuration
  4. Save partials/google-analytics.hbs

Add Theme Partial

This feature requires a theme partial. To add the partial, follow the steps below:

  1. Open default.hbs
  2. Find {{!> "google-analytics"}}.
  3. Remove the exclamation mark to add the partial
  4. Save default.hbs
  5. Restart Ghost

Still need help? Contact Us Contact Us