Tracking Non Google Analytics Campaign Parameters in Google Analytics

Google Analytics can track up to 5 campaign variable of which 3 are required.  Generally, the campaign variables are passed via URL of the campaign landing page.   For example, if you  want to send users to http://www.GAPremium.com via a campaign then you might use something like

http://www.gapremium.com? utm_campaign=Feb2012bannercampaign&utm_medium=bannerad&utm_source = yahoo&utm_content = 300X250&utm_term=training

In the above URL, all the query parameters are the campaign parameter that Google Analytics needs to track and attribute the click to the campaign. (See How to Track Campaigns in Google Analytics for more details)

In some case you might not have the campaign parameters as formatted above, maybe because you were using some other web analytics tool that required different parameters or somebody made a mistake and the parameters are messed up. Whatever the reason ; you just don’t have the right parameters.

Let’s assume that instead of the URL above, your URL looks like following

http://www.gapremium.com? campaign=Feb2012bannercampaign& medium=bannerad& source = yahoo& content = 300X250&term=training

(Note that none of the parameters contain utm_, e.g. instead of “utm_campaign”, the URL only has “campaign”)

So Google Analytics won’t recognize these parameters as valid campaign parameters and will ignore them.  However you can fix the problem by forcing Google Analytics to recognize these variable as valid campaign variable by using few lines of codes. The way you fix them is by calling a function that sets the new campaign parameter

_gaq.push([‘_setCampNameKey’, ‘campaign’]); 

The above code tells Google Analytics to use ‘campaign’ as the CampaignName parameter instead of the ‘utm_campaign’ parameter

Similarly set other parameters as follows

_gaq.push([‘_setCampMediumKey’, ‘medium’]);

_gaq.push([‘_setCampSourceKey’, ‘source’]);

_gaq.push([‘_setCampContentKey’, ‘content’]);

_gaq.push([‘_setCampTermKey’, ‘term’]);

Using Google Analytics to Detremine Who Visited the Site

Customer and visitors alike visit your site but your Google Analytics reports show you aggregate numbers to show how many visits came, from what sources, how many of the viewed a certain page etc.   But these reports don’t tell who visited your site, weather that is an existing customer or someone who has not purchased anything yet etc.

However, there is a way in Google Analytics that allows you to know “Who” visited the site, what sources they used, what pages they saw etc.

Setting Customer ID in Google Analytics

If you store your customer records in a database or CRM solution then you assign each customer and ID that identifies each individual customer.  Assuming you this ID for individual available either in a cookie or in the web session when that individual comes to your site.  You can extract that ID from the cookie or session and pass it to Google Analytics using visitor level custom variable as shown below to get individual level reporting.

_gaq.push([‘_setCustomVar’,index, name, value, opt_scope]);

(Note: You can get more information about Custom Variable at http://code.google.com/apis/analytics/docs/tracking/gaTrackingCustomVariables.html)

Example

Let’s assume that we have that we have a customer “John Doe” identified by customer id 21590 in the database. Let’s further assume that this value is available to us in the visitors online session.

Let’s use the name “UserID” for this custom variable. The slot we will use to store this variable is 3 (You can use whatever slot is available but I decided to store it in slot number 3). The opt_scope is 1 for a Visitor Level custom variable

So the values that we need to set are

index = 1

name = UserID

value = 21590

opt_scope = 1

The way you will set is

_gaq.push([‘_setCustomVar’,1, “UserID”, “21590”, 1]);

Once Google Analytics collects the data you can start to see this data in your Google Analytics reports.

 

Note: Google Analytics does not allow you to pass in PII (Personally Identifiable Information) data but an id, which on its own does not tell you anything about the person is not PII in my opinion. Google Analytic does not clarify if you can use it or not so use it at your own discretion or consult Google Analytics, if they respond.

 

 

How to Find the Keywords marked as “(not provided)”

A few months ago, Google, the search engine, started encrypting searches for user who are logged into their Google account while conducting the search. As a result of this encryption, the keyword that the visitors search to arrive to your site is not passed in the referring URL. Web Analytics tools rely on the keywords passed in the referring URL to build the search engine traffic report and in the absence of the keywords there is nothing to report, though they still see that the visits came from Google search. So Google Analytics now marks those visits that do not have a keyword but come from Google with “(not provided)” keyword instead of the actual keyword.

Finding those keywords

Google still tracks all the keywords search by logged in users but just does not pass it in the referrer to the site that the user clicks through to. These keywords are available in the Google Webmaster Tools.  To see the report you will have to register your sites in Google Webmaster Tool. Google Webmaster tools will allows you to see all the keywords that were searched, the number of clicks your site got, the average position of your site for those keywords and the landing pages.

 

(All images provided by GAPremium.com – Google Analytics Tips and Tricks)

If you are using Google Analytics then you can connect Google Analytics reports and Google Webmaster tools to get Webmaster reporting within the Google Analytics interface.

However there are three issues with this report when used with Google Analytics (or any another web analytics tool)

  1. You don’t get other metric (e.g. goal conversion) about the visits that arrived from the keywords.
  2. This list of keywords includes not only the keywords marked with “(not provided)” but also the other keywords that you see in Organic traffic report. So you will have to do extra analysis to see which keywords are hidden under “(not provided)”.
  3. If you look at Google Webmaster tool report then you will notice that there are a lot more impressions and clicks than those displayed in the Webmaster report and the Google Analytics report (see below). I was not able to find a reason why Google is only displaying the partial number of keywords, if you know the reason then please let me know.

How to Track Campaigns in Google Analytics

Campaign Tracking in Google Analytics requires you to pass ew campaign variable to Google Analytics. The easiest way for you to do that is by appending these variables in the URL that you use in your campaigns

The five values that Google Analytics can use in Campaign Tracking are

  1. utm_campiagn  – A unique name that will help you remember what the campaign was about.
  2. utm_source  – A name that provides you information on where the campaign was run
  3. utm_medium – A name that provides you information on what medium you used for the campaign
  4. utm_content – This is mainly used in A/B testing to provide you information on what variation was used. Use can however, use it for any additional information that you want
  5. utm_term – This is mainly for providing the keywords if you are running a paid keyword campaign.

Required Variables

Only 3 of the above 5 are required variable

  1. utm_campaign
  2. utm_source
  3. utm_medium

The other two are optional. But if you don’t provide the above 3 required variable then you campaign tracking will not work.

Example:

If run a banner ad to promote http://www.gapremium.com then I might tag the URL as follows

utm_campaign = Feb2012bannercampaign

utm_medium = bannerad

utm_source = yahoo (if this ad will run on yahoo)

I might use utm_content to pass in the banner size e.g.

utm_content = 300X250

So the final URL will look like

http://www.gapremium.com? utm_campaign=Feb2012bannercampaign&utm_medium=bannerad&utm_source = yahoo&utm_content = 300X250 

Note: It does not matter what order you pass these variables in but keep in mind that the 3 required ones should be present.

To quickly build these URLs you can use

  1.  Google Analytics URL Builder at http://support.google.com/googleanalytics/bin/answer.py?hl=en&answer=55578
  2. Google Analytics URL builder with URL Shortner – http://www.anilbatra.com/digitalmarketing/twitter-google-analytics-url-builder.asp

Viewing the Report

Campaign Reports are available under “Traffic Source” section of the “Standard Reporting” tab (see below).

 

 

How to Create Goals in Google Analytics

To Create Goals

  1. Click on the Admin link in the profile you want to create the goals in. Admin link is located on the right hand side (see image below)
  2. Click on a +Goal under the Goal Set you want to create this goal under (Also see – What are Goals and Goal Sets in Google Analytics)
  3. On the next screen
    1. Give the Goal a name
    2. Chose “Active” or Inactive” – Inactive means that data won’t be tracked. You will want to do this if you no longer need that goal but do not want to delete it.
    3. Choose The “Goal Type” – Goals are based on URL, Time on Site metrics, Page Views/Visit metrics and Events. Choose the type and it will open a new screen depending on the type you selected. (See below for the various types)
  4. Once all the data is entered click on “Save” button and your goal will be created.
  5. You will start to see these goals in your reports (refer back to “Goals and Goal Sets” post to see the reports)

Various “Goal Types”

There are 4 goals types currently supported in Google Analytics (see the screen above)

  1. URL Destination – You can choose any URL(s) that you want as an end action e.g. thankyou.html
  2. Time on Site – Pick a time that indicates that your site is successful in accomplishing the goals. E.g. visits that spend over 10 mins
  3. Page View/Visit – Pick number of page views/visit that indicate success e.g. visits that viewed more than 7 pages
  4. Event – Choose any event(s) that you want to track as end action

What are Goals and Goal Sets in Google Analytics

Goals

Goals are the end action/activity that you want from your users. They are a measure of success of your site or marketing campaign. Example: Registration, Whitepaper Download, Time on Site more than 10 mins. Currently Google Analytics allows you to create Goals based on Page URL, Time on Site, Page Views/Visit and Event. (I will cover creating goals in another post)

Goal Sets

Goal sets are a way for you to group related goals. For example if you want “Whitepaper download” as one of your goals and there are 3 whitepapers that you currently have with three different pages. You can then use all three of these different pages as 3 goals within the same Goal Set. There is no validation to stop you from using totally unrelated goals in one goal set e.g. member registration goal and whitepaper download goal but you should not do that unless you don’t have any more room to add goals.
Each goal set can have up to 5 goals and there are 4 Goal Sets available per profile.


Goal Sets in Reports

You will see you Goal Sets as Goal Set 1, Goal Set2 and so in your reports. (see below)


When you click on any of the Goal Set in any of the reports that have Goals (e.g. traffic sources report) you will see all the goals in that Goal Set in your report (see below)

How are the Google Analytics Reports Organized

Google Analytics reports are organized into 3 tabs

  1. Home Tab – This tab contains “Real Time Reporting”, Intelligence Events and Dashboards
  2. Standard Reporting – This tab contains most of the report that you will use on regular basis
  3. Custom Reporting – This tab has an option to create custom reports and will also list all the custom reports that have been created in that profile.

When you first log into Google Analytics, you will be taken to a screen with a list of all your accounts and properties.

Click on a property to see a list of all the Profiles underneath in.

 

 

(If you are not familiar with Account, Properties and Profiles then see How Google Analytics Account are Structured)

Click on the profile that you want to see the reports for and it will take you into a section of Google Reports called “Standard Reporting”.  These are the reports that will use most of the time.

I will describe these sections in details in upcoming posts.

How to Give Access To Others To Your Google Analytics Reports

Before you give access to anybody you need to decide the level of control you want the new user to have and what profiles you want to give access to

User Role:

There are two levels of access

  1. User
  2. Administrator

User access level only allows the new user to see the reports only in the profiles that the user is given access to.

Administrator Access allows the user to see reports for all the profiles in an account and also allows them to perform Administrative functions such as add new users, create filters, create new profiles etc. (These administrative tasks will be covered later)

To start adding a user, go to the “Settings” section of Account, Property or a Profile and clicking on the ”Users” tab.

 

When you click on “New User” shown above, you will be taken to the screen below.  This is where you can provide access.

Note: The email address that you are adding as a user should have a Google Account. If the user does not have an account then he/she will be asked to create one using the same email address.

 

In the above form

  1. Add the email address of the person
  2. Assign a role
  3. Select the profile from “Available Profiles” section on the left hand side
  4. Click on “Add” button in the middle
  5. The profile will be added to to the right hand side box and will be removed from the left hand box
  6. Click on Create User and you are done

 

 

See Also: How Are Google Analytics Accounts Structured

Regular Expressions and Google Analytics

What is Regular Expression

According to Wikipedia a regular expression provides a concise and flexible means for “matching” (specifying and recognizing) strings of text, such as particular characters, words, or patterns of characters. Abbreviations for “regular expression” include “regex” and “regexp”.

Where Are Regular Expressions Used

Google Analytics allows the use of regular expressions in profile filters to allow complex implementation search reports using regular expressions (see example: How to Exclude Internal Traffic from Google Analytics, create custom reports with regular expression filters and create advanced segments with regular expression.

 

Create Profile Filters

Search Reports

Create Custom Reports

Create Advanced Segments

Learning About Regular Expression

There are several resources available on the web.  Lunametrics has also written a quick guide on Regular Expression for Google Analytics.

We are also working on a guide and if you have any examples of how you have used regular expression with Google Analytics then please send those to us.

How to Connect Google Analytics to Google Webmaster Tools

Google Webmaster tool provides information on the keywords that your site appeared for on Google, the number of impressions of those keywords,  your sites ranking for those keywords, the  number of clicks to your site for each keyword and the pages that the visitors landed on. It really important for Search Engine Optimization purposes to know how your site is appearing in Google search engine.

Once you connect your Google Analytics account with a site listed in Google Webmaster tool you will be able to see Google Webmaster reports in Google Analytics in Traffic Source –> Search Engine Optimization report (see below)

How to Connect Google Analytics and Webmaster Tools

  1. Go to http://www.google.com/webmastertools and setup an account for your site. You will be asked to verify that you are the owner of the site
  2. Once you have verified the ownership you are ready to link your site to Google Analytics
  3. To link the two accounts go to the “Property Settings” tab of your Google Analytics profile. There is a “Wheel” icon on the right hand side on Google Analytics (see below). Click on that icon to go to “Property Settings” section of your profile. (see below)
  4. Click on the “Edit” link in the “Webmaster Tools Settings” section (see below)

  5. It will open a page that will allow you to select your site. Select the profile and you will be back in Google Analytics.
  6. If you have multiple profiles using the same tracking code then you will have an option to apply the site to all those profiles or you can just choose the ones that you want. That option will be available in the dropdown next to “Enabled Profiles” text.
  7. Hit the “Apply” button and you should start to see your data in the “Search Engine Optimization” report.