How to add a web site in Google Analytics

Home > Search > How-to
  by

  1. Sign into Google Anaytics.
  2. At the top of the page, select Admin.
  3. In the account column, select Create new account from the drop-down menu.
  4. Select Web site or Mobile app.
  5. Under the section called Setting up your Account, enter an Account Name.
  6. Under the section called Setting up your property, enter the Website or App Name.
  7. Enter the website URL.
  8. Select an Industry Category.
  9. Select the Reporting Time Zone.
  10. Under the Data Sharing Settings section, select the settings you want.
  11. Click Get Tracking ID.
  12. You will be provided with code. Save this code into a file named google-analytics.php:
<script>
  (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','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-123456789-1', 'auto');
  ga('send', 'pageview');

</script>
  1. To include Google Analytics into a page, add the following into the HEAD of the page.
<?php include_once("google-analytics.php") ?>

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter in the box below so that we can be sure you are a human.




Comments