Working Of Google Analytics And Mobile Tracking Computer Science Essay

Published: Last Edited:

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

In This paper detail of Google Analytics is briefly discussed. Working mechanism of Google Analytics that is how data is collected, how data is stored on server, how data is calculated to generate reports then what the purpose of Google Analytics is, what are the Features of it and how they are useful to users etc are also discussed.

Web Analytics is a method for continuous evaluation of your web site. You can improve your website's performance through it. Google Analytics acts as a tool for web Analytics. It generates data regarding visitors that come to your web site. You can know when visitor visited your site, where he came from, which browser he is using, which operating system he is using. All these details can be generated by Google analytics. Thus it's providing easy way for website holder to track their web page. Google Analytics also enables site holders to know factors affecting their site's performance. Just by using Google Analytics Tracking code which is provided by Google, site holders can utilize this service.

Google Analytics Tracking code also known as GATC is written in JavaScript. You need to add GATC code at the end of all pages you want to track.

When user requests for any page web server responds by sending requested page back to user. At user side browser starts processing data. When visitor's browser reaches GATC code it begins to execute. During execution GATC collects attributes of visitors and their browsing environment. For example which browser he is using, where he came from, which operating system he is using. As shown in figure in step-1 visitor's browser request for ga.js file from web server. Once this file is loaded cookies are set and data is sent to Google Analytics server. Data is sent to the server as query string parameter in _utm.gif file. When server receives this data it stores it in temporary storage like log file.

Later on data in this log file are stored as value for metrics and dimensions which are used to generate reports.

Working of Google Analytics Mobile Tracking

Figure2-How Google Analytics Mobile Tracking Code collects data. [1]

The standard Google analytics tracking code which is used to track

users can also be used for mobile tracking. But Google Analytics Tracking Code depends on JavaScript and cookies which are not supported in many mobile devices only iphones and android phones support this technology. Thus Mobile Tracking code was developed.

In Mobile Tracking data is collected at server level rather than at browser or device level. Because code collects data at server level it is necessary to implement code in the language you have implemented your web application. Mobile tracking code can be implemented in four languages: ASP, php, Java and Perl.

As shown in this figure in Step-1 it is described that site is built in php. To track this site you need to add PHP code before the <HTML> of all pages and a small block of PHP code before the closing </BODY> tag.

When server processes first PHP block it generates URL that contains information about the visitor. This URL is set in the img tag of HTML. Now as shown in Step-2 through this img tag request for ga.php file is made. This file collects the data and sends it back to the Google Analytics server. This image passes data back to web server where request for _utm.gif image is made.

Once data has been collected it is not process in the same way as standard tracking code. Because Google cannot define certain attributes of visitors when tracking a mobile web site as mobile phones don't support cookies.

Data Processing:

Data is collected at Google Analytics server side in log file. To process this data Google Analytics store it in the form of Metrics and Dimensions.

Metric is basically numeric value, for example total visitors, time spent on page

Dimension is like field of table, for example Browser type, day, connection speed. It specifies attributes of an item.

Categories of Metrics:


It contains metrics that specify total number of visits, how many times single user has visited your website and many more visitors' related data.


It describes campaign related details, for example adClicks that

shows how many times user clicked on an advertisement on your webpage.


It contains only single metric named uniquepageviews that is

unique page views within one visit.


It defines transaction related metrics such as total number of


Internal Search:

This category is dedicated to understand usage of internal search engine in your web site. If your web site contains large number of product pages then search engine can be used to search particular product and search keywords specified in search engine are useful for marketing. SearchDuration, Searchexists are within this category.


It shows how many goals you have achieved that you have

specified in your profile. GoalCompletitions, GoalCompletitionsAll etc

metrics are in goal Category.


As metric is numeric summary Event metric generally shows total

number of events occurred on your page, total number of unique events.

Categories of Dimensions:


Various attributes of users like Browser they are using, city to which they belong are included in this category.


It includes dimensions that define keywords your website is using for

campaign, and other campaign related attributes.


Web page related dimensions are classified in Content category, for example pageTitle, pagePath.


Dimensions that can be used to generate transaction are included here, for ex.productName, productcategory.

Internal Search:

It depicts attributes of search engine like, searchCategory -category

used for searching.

Custom Variables:

It allows you to define custom variables.


This category let you define events and actions to be taken when event occurs.

AdWords :

It includes dimensions that specify to which campaign or to which

group your adWord belongs.


Proper combination of metrics and dimensions are used to generate reports. Reports enable you to investigate users' behaviour more efficiently and quickly.

Reference- []

Reports can be inbuilt or custom.


It is directly generated by Google Analytics.

Custom Report:

Here you have to specify proper dimensions and metrics and based on that reports are generated.

Features of Google Analytics

Ecommerce Tracking:

Through Ecommerce tracking large number of reports are generated that will help website holders to know their customer's choice. Owner can know which product customers like and which they don't like. Ecommerce tracking is very valuable for marketing purpose. To use this feature you need to slightly modify your standard Tracking Code. Add following Transaction section and Item section in Tracking Code.


_gaq.push(['_addItem',Item_attribute1,..,.Item_attributen) [2]

Here Transaction attributes can be OrderID, tax and Item Attributes can be

Product Name, Quantity, Price.

Cross-Domain Tracking:

When users move from one domain to another they are considered as new

visitor on each page. If you want to consider multiple entries as single

entry then cross domain tracking is used. You can track unique user across

multiple domain. Using this feature you can track users across domain and

its sub domain, across multiple sub domains. For cross domain tracking

you need to modify standard tracking code.

Event Tracking:

Using Event tracking feature you can track various events on your page.

Interaction with video player or audio player etc event can track with

Google Analytics.You can track all using following JavaScript code:


_value]); [3]

Category: Object you want to track, for example video, audio.

Action : Action you want to track that is play, stop etc.

Last two fields are optional.


Every web site owner should use Google Analytics so they can know where their website lacks and improve upon that area. Site holders can also know what their users like and what they do not like and based on it they can improve performance of their web site. Currently Google Analytics is widely used for marketing purpose.