Small Victories
160528 google analytics tip

Ideas

Need Google Analytics?

Adding Google Analytics to your Small Victory

First you need to find your tracking code. You already set up a google analytics account right (if you haven’t this will tell you how)? Follow these steps to get your tracking code.

Once you have that all you need to do is drop the code, without the <script> tags, into your _sv_custom.js file in you site folder in Dropbox. It should look something like this:

function($) {
    // Write your own javascript here.
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

  ga('create', 'GOOGLE_ANALYTICS_ID', 'auto');
  ga('send', 'pageview');
}(window.jQuery);

Check out the docs for more tips like this.

:triangular_flag_on_post:

Next Post

Featured Site

Design is Trash