Google Analytics is a great, free tool you can use to gather all sorts of anonymous information about your visits. This tutorial will show you how to install Google Analytics tracking code on your Leafpub website — no programming required.

Get Your Tracking Code

The first step is to get your tracking code from Google Analytics. It will look something like this:

(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),

ga('create', 'UA-XXXXXXX-XX', 'auto');
ga('send', 'pageview');


If you're new to this, first you'll want to create a Google Analytics property, then you'll be able to get your tracking code.

Install the Tracking Code

Now for the easy part. Navigate to Settings > Advanced and look for the Custom Code section. Paste your tracking code into the box for {{leafpub_foot}}.


That's it! Hit Save and you're done. Now all the pages on your website will have the tracking code installed and data will start flowing to Google Analytics.