Tuesday, 17 September 2013

Google Analytics Individual Qualified - Topics Covered

Revision Topics List

I'm going to break down my revision notes by topic as laid out on the Google Analytics Test website.

  • Accounts & Profiles
  • Google Analytics Tracking Code
  • Advanced Segments
  • Google Webmaster Tools
  • Browsers & Operating Systems
  • In-Page Analytics
  • Content Experiments *
  • Intelligence Events & Custom Alerts
  • Cookies & Sessions
  • Internal Site Search
  • Custom Reports
  • Mobile Devices
  • Custom Variables
  • Multi-Channel Funnels
  • Dashboards, Shortcuts & Sharing
  • Profile Filters & Profile Settings
  • Dimensions & Metrics
  • Real-Time Reports
  • Domains & Subdomains
  • Regular Expressions
  • E-commerce & Revenue
  • Search Engines & Search Engine Optimization
  • Events & Virtual Pageviews
  • Social *
  • Geography & Localization
  • Table Views & Table Filters
  • Goals & Funnels
  • Time & Annotations
  • Google AdSense **
  • Traffic Sources & Campaigns
  • Google AdWords & Search Engine Marketing
  • Visitors, Visits & Pageviews

Accounts & Profiles

Notes from Google Analytics Developers Guide

  • You may have up to 50 views (profiles) in any given Analytics account.
  • If you want to provide administrative access to other users of an account, those users will be able to see and modify all view (profile) data for all websites being tracked in the account.
  • You cannot migrate historical data from one account to another. Thus, if you set up an account for a web property and then later want to move tracking to a separate account, you cannot currently migrate the data from the old account to the new account
  • When you already have a functioning view (profile) for an existing website, and you add an additional view (profile) later on in time, the additional view (profile) will not contain the historical data that you see in the view (profile) created earlier.
  • You share your Analytics reports with other people who have Google Accounts.

Tuesday, 10 September 2013

How to Get Top Search Queries Data from Webmaster Tools API

Here's how to get a .csv file of your latest Search Query report from the Google Webmaster Tools API.

Go download the gwdata.php api file here.

Here's sample code from the docs which grabs a .csv of your latest Search Query report and saves it in the same folder.

<?php
include 'gwtdata.php';
try {
$email = "XXXXX";
$password = "XXXXX";
# If hardcoded, don't forget trailing slash! $website = "http://nerdygoodness.wordpress.com/";
# Valid values are "TOP_PAGES", "TOP_QUERIES", "CRAWL_ERRORS",
# "CONTENT_ERRORS", "CONTENT_KEYWORDS", "INTERNAL_LINKS",
# "EXTERNAL_LINKS" and "SOCIAL_ACTIVITY".
$tables = array("TOP_QUERIES");
$gdata = new GWTdata();
if($gdata->LogIn($email, $password) === true)
{
$gdata->SetTables($tables);
$gdata->DownloadCSV($website);
}
} catch (Exception $e) {
die($e->getMessage());
}
?>

I've run this code to get the top search query report from my other blog nerdygoodness.wordpress.com. The results of which can be seen here.

Tuesday, 3 September 2013

Google Analytics Individual Qualification - the journey begins

I've decided to prepare for the Google Analytics Individual Qualification.

I'll document my progress here in the hope that it helps someone else who wants to actually know what they're talking about.

I've listed some of the Revision Resources I'll be using here

Friday, 18 June 2010

The components required to enumerate web references are not installed on this computer. Please re-install Visual studio

Go here:

C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\


Run this:

devenv.exe /ResetSkipPkgs

Job done!

Monday, 7 December 2009

CSS Sprites

Good explanation of css sprites and how to use them

http://css-tricks.com/css-sprites/

Some other really good css stuff on this site too. One for the bookmarks.

Thursday, 3 December 2009

jquery carousel

check it out

http://sorgalla.com/projects/jcarousel/

Monday, 23 November 2009

Rounded Corners with JQuery the Painless Way

Rounded corners with JQuery

http://code.google.com/p/jquerycurvycorners/downloads/list

It's this easy. Let's say you want all divs with the css class of rounded to have rounded corners. You just add this: $("div.rounded").corner(); inside the document.ready block.

Friday, 13 November 2009

Adding User Controls programmatically

If you haven't come across this problem yet when developing webforms projects then trust me, at some point you are going to.

Scenario

You have a view product page in a shopping cart application which has an "add to cart" button which adds one of these products to a shopping basket.
Your client comes along and says they want users not to have to drill down to the product detail page to add products to their baskets. So you are
now faced with having to work out how you will add an add to cart button to each product summary. Here's how you could deal with this problem.

1. Create a user control which displays a product summary and maybe call it something like displayProduct.ascx

2. User Controls are classes so expose a property or properties within the code behind file

For example let's say your Product Class has an ID property you could set your user control to have a productID property like this:


Private _productID As Integer

Public Property productID() As Integer
Get
Return _productID
End Get
Set(ByVal value As Integer)
_productID = value
End Set
End Property


2.a. take the add to cart button functionality from your product detail page and replicate it in your user control. So you might add a button called
AddToCart and code something like:

Protected Sub AddToCart_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles AddToCart.Click
Dim c As New Cart
Dim p As New Product
p = p.GetProductByID(me._productID)
c.AddProductToCart(p)
.... etc
End Sub

3. Add a placeholder control to your new product listings page to contain the user controls.

4. Now for the clever bit, let's say you have a ProductManager class which returns a list of Product class instances which you can pass into your
user controls, you can then loop through this list and add a displayProduct.ascx user control for each Product in your list. The code might look something
like this:



Public Sub DisplayHandsets()
Dim pm As New ProductManager
Dim pl As New List(Of Product)
pl = pm.GetProducts
Dim p As Product
For Each p In pl
'add user control for each product
Dim dp As displayProduct = CType(LoadControl("displayProduct.ascx"), displayProduct)
dp.productID = p.ID
' add the user control to your placeholder
phProducts.Controls.Add(dp)
Next
End Sub

5. Give yourself a big pat on the back for doing some serious nerd kung fu!

Regular Expressions 101 Part Two

In the previous post in this series we looked at a simple example of a regular expression:



^\d*$



which restricts input to either none or any number of digits.



The table below outlines a few slightly more complex variations of this regular expression and in which instances they would be valid.


"yes" means that particular number of digits would be valid input.




















































Quantity of numerical characters+*{2}{2,3}
Regular Expression^\d+$^\d*$^\d{2}$^\d{2,3}$
0
yes

1yesyes

2yesyesyesyes
3yesyes
yes
4yesyes


So to break this down "+" means one or more instances of the "pattern" specified
by the regular expression is required; "*" means none or any quantity of the
pattern need to be present; "{2}" means the length must be 2 instances of the
specified pattern; {2,3} means there must be either 2 or 3 instances of the
pattern present.

Here's a list of some characters found in regular expressions and what they mean:


  • . - any character

  • ? - optional i.e. there can be either none of these or any other quantity

  • + - at least one or more

  • * - none or any quantity

Regular Expressions and Grouping

You can also specify groups of characters to be matched by a regular expression. For example:

([A-Z][a-z]) specifies that the pattern must start with a Capital letter followed by a lower case character.

Clear as mud eh ;)

Tuesday, 10 November 2009

Regular Expressions 101 Part One

Today I managed to get a straightforward explanation for something which has always looked like gobbledy-gook to me i.e. Regular Expressions. So I thought I would share what I've picked up so far and add more as and when I get my head round this stuff.

So here's an example regular expression:

^\d{2}$

This would restrict input to numeric values only and two characters maximum length.

^ = start
\d = numbers only
{2} = how many
$ = end

There is a very useful regular expression testing tool here

Let's say you want numbers only i.e. no numbers or only numbers.

^\d*$