Want deep analytics for your Ghost publication? Ghost integrates with Segment using straightforward code injection
Get in-depth site metrics and gain a deeper understanding of your readers with a seamless integration for site-wide tracking. Segment is one of the most powerful, advanced platforms collecting and analysing customer data.
Set up a new Segment source
When you create a new Segment account, follow the instructions to create your first data source for your Ghost site. Select the
Get the tracking code
Once you've created the new source, you'll be taken to the project settings area. From here, copy the tracking code 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 Segment needs to track user behaviour across your entire site, we'll use the global code injection feature which can be found in the Ghost Admin settings menu.
Segment requires the tracking code to be in the
<head> of each page on your site, so paste it into the Header section and hit save.
Your site is now fully integrated with Segment and you can connect to as many third party data services as you like and enjoy the event pipeline which Segment provides.