 |
|
|
 |
Posts Tagged ‘web analytics’
Aug 04 2011
Back in August 2008, I wrote a post on how to optimize form length with input analysis with Google Analytics. This is still a very relevant topic, as forms are still essential to collecting data from visitors. I still cringe when I see a form that has a ton of fields, and I know many of you do as well. This post will show you how to take action to shorten your forms and remove unneeded fields, which usually results in higher conversion rates for your forms.
The old post referenced the traditional/syncronous version of the Google Analytics tracking code. This new post features the newest release by Google, which is the asynchronous code execution.
Please note that I am not going to re-do the entire post, just the code portion.
So here is the code update:
Traditional Snippet (Synchronous):
function validate()
{
isEntered(document.getElementById('name'),'name');
isEntered(document.getElementById('email'),'email');
isEntered(document.getElementById('phone'),'phone');
isEntered(document.getElementById('company'),'company');
isEntered(document.getElementById('comments'),'comments');
frm.action='/thankyou.aspx?src=contact_us.htm';
}
function isEntered(el, field_name)
{
if((el.value=="") || (el.value==null))
{
pageTracker._trackPageview('/contact_us.htm/empty/'+field_name);
}
else
{
return false;
}
}
Asynchronous Snippet (NEW):
function validate()
{
isEntered(document.getElementById('name'),'name');
isEntered(document.getElementById('email'),'email');
isEntered(document.getElementById('phone'),'phone');
isEntered(document.getElementById('company'),'company');
isEntered(document.getElementById('comments'),'comments');
frm.action='/thankyou.aspx?src=contact_us.htm';
}
function isEntered(el, field_name)
{
if((el.value=="") || (el.value==null))
{
_gaq.push(['_trackPageview', '/contact_us.htm/empty/'+field_name]);
}
else
{
return false;
}
}
Related Posts:

Technorati Tags: form optimization, google analytics, web analytics
Tags: form optimization, google analytics, web analytics Posted in web analytics | No Comments »
Jul 29 2011
Back in January 2009, I wrote a post on how to track traffic from Press Releases in Google Analytics. That posts referenced the old synchronous version of the Google Analytics tracking code and needed a code update with the most recent tracking code release by Google, featuring asynchronous code execution.
Please note that I am not going to re-do the entire post, just the code portion.
So here is the code update:
Traditional Snippet (Synchronous):
<script type="text/javascript">
var srcPage = getDomain (document.referrer);
var parameter = get_parameter('id');
function get_parameter(name)
{
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regexS = "[\\?&#]"+name+"=([^&#]*)";
var regex = new RegExp(regexS);
var results = regex.exec(window.location.href);
if( results == null )
return "";
else
return results[1];
}
function getDomain (thestring) {
var urlpattern = new RegExp("(http|ftp|https)://(.*?)/.*$");
var parsedurl = thestring.match(urlpattern);
if( parsedurl == null )
return "";
else
return parsedurl[2];
}
if (parameter == '1')
{
window.location.hash = "utm_source="+srcPage+"&utm_medium=press_release&utm_campaign=hurricane_katrina";
}
</script>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-XXXXXXX-X");
pageTracker._setAllowAnchor(true);
pageTracker._trackPageview();
} catch(err) {}
</script>
Asynchronous Snippet (NEW):
<script type="text/javascript">
var srcPage = getDomain (document.referrer);
var parameter = get_parameter('id');
function get_parameter(name)
{
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regexS = "[\\?&#]"+name+"=([^&#]*)";
var regex = new RegExp(regexS);
var results = regex.exec(window.location.href);
if( results == null )
return "";
else
return results[1];
}
function getDomain (thestring) {
var urlpattern = new RegExp("(http|ftp|https)://(.*?)/.*$");
var parsedurl = thestring.match(urlpattern);
if( parsedurl == null )
return "";
else
return parsedurl[2];
}
if (parameter == '1')
{
window.location.hash = "utm_source="+srcPage+"&utm_medium=press_release&utm_campaign=hurricane_katrina";
}
</script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXXXX-X']);
_gaq.push(['_setAllowAnchor', true]);
_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>
Related Posts:

Technorati Tags: google analytics, press releases, web analytics
Tags: google analytics, press releases, web analytics Posted in web analytics | No Comments »
Jan 13 2011
Just recently, one of our clients asked me to share with their analysts a number of custom segments and custom reports that I’ve created for them. With the new “Share” segment button, it was very easy to share the URL of the segments/report and email them to the client.
When the analysts clicked on the segments’ URLs, they imported the report structure exactly as it was configured under my login. But when they saved the segments under their login, the segments were saved under wrong profiles!
Why to share segments?
First of all we need to know that Advanced Segments and custom reports in Google Analytics are tied to the user login and not to the account/profile under which these segments are created in. So if two users have access to the same profile but they are using different login to access the GA account, the segments created by user A are not accessible to user B unless they are manually shared by user A. So, all the amazing segments and custom reports that E-Nor creates under their Google Analytics login will not be visible to their clients who are using a different login credential, even though both E-Nor and their clients are logged into the same GA account.
What went wrong with the segments I shared with our client?
When our client’s analysts clicked on the shared segment’s URL, the segment showed up by default under the first profile of the first account that the login of each user has access to. Because the relevant profile applicable to the segment was not the first profile in their accounts list, they failed to add the segment to the right profile and when they later logged in they were unable to allocate the segment under the given profile.
Disclaimer
The “share” functionality in the Advance Segment and Custom Report is good as long as the recipient of the shared segment applies the segment to the right profile using the “Visible in” menu (See point# 6 of this post). But if you want to make the life of the recipient much easier then follow the simple solution provided below.
Solution:
After looking at the Segment link and other GA reports links, I noticed that if we add the Profile ID to the link URL as parameter, then the segment will be populated under the right account and the right profile. So the solution is simply to attach the profile ID with the segment link
How:
Let me translate the above solution to 5 simple steps to follow:
1. How can I get the profile id?
Google Analytics assign a unique ID for each profile. This profile ID is different than the account ID [UA-123456-1], which we add to the website pages along with the JavaScript pixel. In order to find the Profile ID, just log in to Google Analytics and locate the account and the profile under which you created the “Advanced Segment”. Click on Analytics Settings > Edit, and the Profile ID will be in the upper left corner of the profile settings page.

2. How to create advanced segments and custom reports?
This is not the focus of this blog post, nevertheless, to learn how to create your own advanced segment read the following help topics:
3. How to get the custom segment Link?
Click Share for the relevant segment or report. [Go to Advanced Segments > Manage your advanced segments > Share > Copy the URL]

4. How to add the profile ID that I got from step# 1 to the segment Link URL that I got from step# 2?
Very simple! Just append the Profile ID [ex. id=18900120] to the end of the segment link URL
5. What is next?
Send the enhanced segment link to anyone who has access to the Google Analytics account. When the recipient clicks the link, a template of your advanced segment or custom report loads under the correct account and correct profile.

6. What if I receive a segment link that doesn’t contain the profile ID?
Well, then you need to manually apply the segment to the desired profile.
At the bottom of the segment page, use the “Visible in” menu to select the profile(s) where you want the segment to be available.

Happy Analysis

Technorati Tags: advanced segment, Custom Reports, google analytics, Segmentation, web analytics
Tags: advanced segment, Custom Reports, google analytics, Segmentation, web analytics Posted in web analytics | 2 Comments »
Jan 10 2011
I have recently guest-authored a series of posts on mobile analytics strategy on the Google Analytics blog. Each of the three posts highlights simple yet key steps for marketers to track their mobile traffic and improve their returns.
For those of you on the go, here’s a quick glance at the material I covered. Try to make time to read each post in-depth, even if you have to read it on your smart phone!

1 – Look for Mobile Trends
In the first post, I detail how to monitor and analyze mobile traffic using key performance indicators. This is best done by customizing your GA settings to receive mobile traffic reports, custom alerts, and for the enthusiast, using the Google Analytics data export API.
2 – Give Your Reports More Dollar Power
So you’re mobile trends are positive, do you just throw the data to your boss? No. You always want to give your reports more dollar power. The second post centers on the power of presentation. If you’re CEO can easily connect the dots, two bottoms will be covered — your company’s and yours!
3 – Act on Your ROI
The average analytics guy will stop at step 2, but the third post encourages you to do more. Additional segmentation and leveraging AdWords’ reports will allow you the much needed visibility into campaign performance to maximize your results.

And There’s More!
For tor the technically inclined, and to get a more comprehensive perspective on your mobile presence, there is more you can do. Check out the code site page on mobile to:
- Track native iPhone or Android applications
- Track activities on websites from low-end mobile devices
And be on the lookout for niche analytics solutions specifically built for mobile.
Remember, it’s never too late to start maximizing your company’s mobile investment and implementation. Be sure to check out each post for more details and practical tips.
For more analytics tips and insights, follow @ferasa on twitter. Happy analyzing!
Technorati Tags: google adwords, google analytics, mobile analytics, mobile traffic, pay per click, search engine marketing, Segmentation, web analytics
Tags: google adwords, google analytics, mobile analytics, mobile traffic, pay per click, search engine marketing, Segmentation, web analytics Posted in web analytics | No Comments »
Dec 09 2010
One of our most well received posts this year was on “Tracking Online and Offline Marketing Campaigns with Google Analytics”. The post detailed how to properly plan for and track your various marketing initiatives and campaigns (search, email, social, offline, etc.) to understand the impact and ROI of each channel.
That post was geared towards those who already had a good understanding of URL tagging. How about the beginners? In this post, we will try to address both beginners and advanced users. Does either of the bullets describe you?
- You are familiar with URL tagging, but need to find a way to automate the process using an elaborate tool
- You are looking for a brief how-to guide on URL tagging.
If the answer is yes, keep reading. Actually, keep reading either way – this was just a poorly crafted attempt at being dramatic.
Although url tagging isn’t a hot new topic, proper planning and tagging is fundamental to improving visibility into campaign performance, overall accuracy and proper attribution of campaign conversion data. Some of the most common questions we get asked are related to URL tagging, so we figured it was time to share some of the tools we use internally to help make the URL tagging process less mundane and more bulletproof.
Why should I continue reading? Here’s what you’ll get…
- Online URL Tagging builder
- An Advanced URL Tagging Kit (Excel based), and yes, it’s free!
- A video guide & practical tips
Ok fine….How do I get started?
Start with the end result of tagging – a pivot report with Channel Segmentation.
Impress your boss and brag about your marketing channel and campaign segmentation skills, show them a sample report like this one (and get additional help/resources for your analytics team!) and then proactively follow the steps and tools in this post.

Let me explain why the above report is so powerful:
- All your campaigns – online and offline are segmented and properly tracked
- The pivot data is in an analysis friendly format
- The raw data is available and easily exported from GA (extracted into Excel via the API)
The three tools listed below will help you set up proper campaign tracking.
1- Online URL Builder
If you’re trying to learn how to build properly tagged URL’s or just need a tool to facilitate building a quick link or two, this tool will serve your needs very well. It’s quick, easy and available online here:
http://www.e-nor.com/url-builder.aspx

Simply enter the appropriate values, and then press the Generate URL button, and you’re done.
2- The Google Analytics Campaign Segmentation | URL Tagging Kit (beta)
The URL builder above is great for onesey twosey links, but woefully inadequate if you have more than a few links to tag (who doesn’t?) For a more robust method, check out E-Nor’s URL Tagging Kit. This Kit provides an automated method to tag many urls at the same time for multiple campaign variables. Using the URL Tagging Kit offers the ability to tag in bulk, updates formulas, error checks and prepares final tagged URLs for distribution to the campaign manager and then off to Quality Assurance.
Input Parameters:

Output Tagged URLS!!!

For beginners, just use the default settings and tag away!
For advanced users, here is what you get with this beta version:
- Auto concatenation of tag fields
- Error checking
- Space character is handled gracefully
- Character case is auto-fixed based on selection
- Leading/trailing spaces are trimmed
- Your choice of querystring parameter character (? Or #)
- Auto-creation of final static version of the tagged URL
Download the URL Tagging Kit here

3- Online Video Tutorial
Don’t have time to read? Just watch the short tutorial below
(for whatever reason, I can’t seem to get full screen mode enabled on this video. Click here to watch the video on Youtube with full screen enabled.)
Practical Tips
- Google AdWords offers an “auto tagging” feature, if you turn it on and you connect your AdWords account with your Google Analytics account, you are all set. No manual URL tagging are required.
- Use URL Tagging for campaign types, such as:
- Newsletters
- Email
- Banners
- Affiliate
- Shopping Comparison Sites
- Non-Google CPC, CPA or CPM based advertisements
- Press Releases
- TV
- Radio
- Basic UTM tagging only applies to your domain(s) and does not apply to external domains.
- Check which querystring parameter your site supports: ? or # (if you are using # as your querystring parameter, make sure you read the reference from Google Code on the _setAllowAnchor command)
- Establish an insightful naming convention for your team & stick to it!
- Ensure a QA process is in place:
- QA naming convention (including upper and lower case) and if you use holiday_2011, don’t use FALL-2011 for the same campaign.
- Check links to verify landing pages render properly.
- Verify final tagged urls in all final content.
- Verify information is passed to Google Analytics as planned.
So there you have it. Tag, Track, Segment, Analyze and Optimize!
Advanced User Notes:
- For advanced users and those interested in multi-channel attribution, you can make use of the Multiple Custom Variables (MCV) feature in Google Analytics to measure first, last (and in between) campaign attribution
- If you are running social media and online viral marketing activities and you are active in blogging, on Twitter and Facebook, you should include “off-site” measurements in your overall campaign analysis.
- Here’s a nice post on the GA blog detailing a solution that requires no tagging.
Related Posts
Technorati Tags: api, google analytics, pivoting, Segmentation, url builder, url tagging, web analytics
Tags: api, google analytics, pivoting, Segmentation, url builder, url tagging, web analytics Posted in web analytics | 2 Comments »
|
|
 |
|
 |
 |
 |
|
|