Thursday, August 7, 2014

Google Analytics Project

Google Analysis Project
597 - Introduction to Analytics


There is 4 topic in my web log about Google Analytic, here is the links:

1)  Google Analytics - Platform Principles

http://usa-da.blogspot.com/2014/07/google-analytics-platform-principles.html

2) Google Analytics - Data collection

http://usa-da.blogspot.com/2014/07/data-collection.html

3) Google Analytics - Processing & configuration

http://usa-da.blogspot.com/2014/07/google-analytics-processing.html

4) Google Analytics - Reporting

 http://usa-da.blogspot.com/2014/07/google-analytics-reporting.html

As you know you must add some tracking codes ( provided by Google) to your web site which is responsible for gathering and sending information to you Google Analytic account. here is simple tracking codes:
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-XXXXX-X']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
You can find more information here:
https://developers.google.com/analytics/devguides/collection/gajs/

There is another option to import your previous gathered analytic data in Google Analytic. Here is the steps which I provides some cost Data for my Google Analytic Property:

        
           1) Creating New Property as CALMAT-Data-Analytic in Google Analytic Admin Page


       2) Create a data set























      3) Prepare the cost data CSV file for upload
There is a great site for generating customized CSV files:
http://www.mockaroo.com/
I created this data, based on Data Schema I got from step 2:




Sample Data:
ga:date,ga:medium,ga:source,ga:adClicks,ga:adCost,ga:impressions,ga:adGroup,ga:keyword,ga:campaign
20110715,cpc,ad network,664,34,55814,Ad group #1,Pictures,Campaign #4
20130616,cpc,ad network,565,146,05781,Ad group #4,Phone,Campaign #4
20111116,cpc,ad network,969,1943,52306,Ad group #4,Pictures,Campaign #1
20110506,cpc,ad network,17,3676,03879,Ad group #1,Phone,Campaign #1
20130305,cpc,ad network,78,61,84502,Ad group #3,Phone,Campaign #4
20121006,cpc,ad network,9,70,48713,Ad group #4,Pictures,Campaign #2
20101229,cpc,ad network,19,66,14264,Ad group #3,Pictures,Campaign #2
20121005,cpc,ad network,28,52,43913,Ad group #3,Phone,Campaign #1
20111221,cpc,ad network,716,60,74781,Ad group #2,Phone,Campaign #4
20101221,cpc,ad network,4,45,34767,Ad group #4,Phone,Campaign #2
20110118,cpc,ad network,427,5731,95009,Ad group #3,Phone,Campaign #1
20110902,cpc,ad network,0,0092,30372,Ad group #1,Phone,Campaign #4
20110508,cpc,ad network,16,9267,86882,Ad group #3,Pictures,Campaign #4

4) Upload cost data using the Management API




There is a link in Data-Import Data-Set for importing Data:
Notice: It takes about 12 hours the Data to be processes by Google then you can see the related reports in Report section of Google Analytic


5) Create and View the Report
In Reporting Section there is Acquisition and Cost Analysis which you can view and customize the report, Here is sample of report for 100,000 records randomly created by step 3: