Official Ghost + Google Analytics Integration

Set up a new Google Analytics property

When you set up a new Google Analytics account, follow the prompts to create a new property for your Ghost site.

If you’re already using Analytics, navigate to the admin area from the cog button in the bottom left corner, and click the blue Create Property button.

Next, add a data stream and choose Web.

Enter the URL for your website (like demo.ghost.io) and a stream name (like “My Ghost Site”). Choose the options you want to enable and click Create stream.

Get the tracking code

Once your stream is active, you’ll see an option to add a global site tag.

Copy the provided code snippet to your clipboard.

Use Ghost Code Injection

In Ghost, you can inject code across your entire site or on an individual post or page. Since Google Analytics needs to track user behavior across your entire site, we’ll use the global code injection feature, which can be found in the Ghost Admin Settings menu.

Google Analytics requires the tracking code to be added to <head> of each page on your site, so paste the copied code into the Header section and hit Save.

Confirm Google Analytics is working

Your site is now fully integrated with Google Analytics. In Google Analytics, go to Reports in sidebar, click on Realtime, and refresh your site. Your activity on the dashboard confirms that Google Analytics is working on our site!

Launch your big idea

Last week, 10,603 brand new publications got started with Ghost.

Today, it's your turn.

Start publishing now →