Google Analytics Basics

In Google Analytics Basics set up your Account | Property | Install tracking code | Filters. Click on Google Analytics Login and add your website. You will need a Gmail account to sign in and the first page you will see is fig1.1

fig1.1 - Google Analytics Basics
fig1.1 – Google Analytics Basics

Read more by clicking on Web Analytics.

fig 1.1– Google Analytics Basics: Grid Icon

Click on the ADMIN-grid icon at the bottom

fig1.2 - Click on Create Account
fig1.2 – Click on Create Account

fig 1.2– Create Account

Click on [Create Account]

fig1.3 - Enter details
fig1.3 – Enter details

fig 1.3-Enter details for your website or app

This includes- Account Name | Website Name | Website URL | select Industry Category from the drop-down menu | select Reporting Time Zone from dropdown | check/uncheck data sharing settings checkboxes | click on [get tracking ID] button.

fig1.4 - Accept Google Analytics T&C by checking both the boxes.
fig1.4 – Accept Google Analytics T&C by checking both the boxes.

fig 1.4– Check the 2 boxes in Google Analytics Terms of service.

Scroll down and click on I Accept tab to get success.

fig1.5- View page displays tracking code.
fig1.5- View page displays tracking code.

fig 1.5-Page displays Tracking Code

In the view page you will get a display of the tracking code. Alternatively, you can view the tracking code under create property dropdown, scroll down and click on .js tracking info for a display of the tracking code.

Copy & paste the tracking code script to all your website pages below the <head> tag. [Paste the tracking code in the <head> tag in each of your web pages if you have an HTML website & in the header.php page of your website if you have a PHP based website like WordPress.]

fig1.6- Copy tracking code

fig 1.6-Tracking Code

In your WordPress website go to Dashboard and on the left side under Appearance tab drop-down, scroll below to Editor and click to get a view of WordPress files of your theme on the right side. Press the header.php and paste the tracking code in the <head> tag. Proceed to the ‘update button’ and save the settings. Alternatively, you can use an FTP Client to download the header.php file to your computer, paste the tracking code in the <head> tag and upload header.php back to your WordPress files.

fig1.7- Property Settings
fig1.7- Property Settings

fig 1.7 -Property settings

Under create property go to property settings. Toggle settings to ON for “enable users metric in reporting” by scrolling down to the page bottom.. Next click on “save” button

fig1.8- View
fig1.8- View

fig 1.8 -View

Under create view go to view settings. Give a name to your view reporting. [In the fig. see the view name which is set to “All Web Site Data”] Next scroll down under users to “show user-id reports” and the toggle button to ON and click on “create view” button

The Google Analytics installation depends on the theme, plugins, and platforms you use.

Basic Filter Settings

Two ways to filter your own traffic from Google Analytics reports:-


fig 2.1-Filters

Filter your own static IP address. [To get your IP address, simply type the query in browser “my IP address” and your IP address will be displayed on top of the search result page.] From the google analytics dashboard press the gear icon to land on this page. Go to View and click on filters and select a new filter to create a new filter. After going through the steps shown (in the fig) click on save to add your filter to google analytic report. Your traffic will not be tracked for the IP address that was just added.

fig2.2- Add Filter to View
fig2.2- Add Filter to View

fig 2.2-Google Analytics Basics: Cookies

filter your own traffic using cookies. Exclude internal traffic by cookie content.

Setup, a filter that will exclude the traffic coming from your computer, go to [Filters] in your Google Analytics account and, select a [Custom filter].

Select [Exclude] to exclude traffic, [User Defined] as [Filter Field] setting the custom variable and add [filter_ctraffic] to [Filter Pattern]. Save the above settings

[filter_ctraffic] is a custom variable in the body tag of the HTML document.

Next, create an HTML page & name it as ‘Filter Traffic Var’ (or any thing else you would like it to be) with the following code and place it on the server. Enter your Google Analytics tracking code to replace the below-highlighted text.

fig2.3- Google Analytics Basics: Tracking Code
fig2.3- Google Analytics Basics: Tracking Code

<!DOCTYPE html>


<title>Excluding traffic by Cookie Content</title>              

<meta name=”robots” content=”noindex” />                                  

<!– Google Analytics –>                                                                



 (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)               


ga(‘create’, UA-XXXXX-Y, ‘auto’);                                             

ga(‘send’, ‘pageview’);                                                                   


<!– End Google Analytics —> 



<h1>Excluding Traffic by Cookie Content</h1>
<p>Whenever you use this browser, Google Analytics will filter the traffic that comes from your computer since the page has a cookie set up in it.</p>
<p> Set up a filter in Google Analytics immediately, after the setup of this cookie page</p>
<p> One visit to this page would be sufficient </p>
<p> Reinstall the operating system or the browser, if by chance you happen to clear or delete your browser cookies. The page will have to be re-visited again, so that the cookie is set again</p>



This HTML page sets a cookie in your browser that directs google analytics to filter all the traffic that comes to your browser whenever this browser is used.

To set up a filter in Google Analytics you will be required to visit this page only once.

If the browser cookies are cleared restore the setting and re-install the browser or operating systems and re-visit this page so that the cookies are set again.

fig2.4- Google Analytics Basics: Add Filter
fig2.4- Google Analytics Basics: Add Filter

fig2.4-Add Filter

Above shows the view of the two filters that have been set in Google Analytics.

Google Analytics Basics: Glossary

Account — relates to the property on the dashboard. You can set up multiple properties in one account or have multiple accounts for different properties

Property — the website or mobile app you want to track

Tracking ID — a unique code added to your site that allows Google Analytics to track it

Channel/Traffic source — is traffic which came from referrals or links from other websites, search engines, social media and emails

Session duration — how long visitors spend on your site

Landing page — the first page a visitor sees when visiting your website