Isrg Knowledge Base
The Best Way to Gain Knowledge

How to Deploy Google Analytics without JavaScript?

Analytics from Google is a powerful tool that help you to collect deep insight from your website, blog and apps. The Google Analytics is loaded with tons of powerful tools including live insight of the hits and visits on your website. The Google Analytics is integrated by placing snippet of JavaScript code which may not execute on the browsers with JavaScript turned-off and because of this you may miss out most of insight. This article will guide you in implementing and deploying Google Analytics on your Website or Blog without JavaScript.

Things you will need

  • Google Analytics Account
  • Basic Knowledge of HTML and JavaScript

Step 1- Handling Google Analytics tracking code

You need to have Google Analytics code. You can ignore step-1 if you have Google Analytics code else  if you don’t have you can learn and can get by following below instruction-

  • Click on the Admin tab and then under the Property Column Click on Tracking Info and select Tracking code option

On Clicking Tracking code option some JavaScript will appears in the right side of the sidebar menu, for your convince example is given below:

Step 2- Creating your own tracking code without JavaScript

  • Copy your Google Analytics Tracking ID, you can get this from the tracking code provided by the Google Analytics account (See first step if you need help).  It is in the following format UA-123456789-1, for reference see the above example.
  • Replace “Your Site tracking  here” below with your tracking ID and with your domain name.

Now copy above code and paste it anywhere on your website or blog. You can also use <noscript> tag to tell the Browser to include only in case of JavaScript is disabled. See below example:

Now Cheers! Hope this will help you