Tuesday, July 31, 2012

Getting AdMob ads to work with cocos2D

cocos2d for iPhone is a popular framework for building 2D games for iOS. Integrating AdMob ads into cocos2d apps has gotten significantly easier with the latest version of the framework; This blog post will show you three things to keep in mind using v0.99.5b3 or higher of the cocos2d framework. It is assumed that you already have some familiarity with cocos2d.




Initialization

Create and initialize a GADBannerView in the RootViewController class. You can put this code into a new method knowing that it will be called from the AppDelegate after the view hierarchy has been set up. This code adds to the standard banner view example in the docs.




- (void)initGADBanner {

// NOTE:
// Add your publisher ID here and fill in the GADAdSize constant for
// the ad you would like to request.
bannerView_ = [[GADBannerView alloc] initWithAdSize:kGADAdSizeBanner];
bannerView_.adUnitID = @"PUBLISHER_ID_HERE";
bannerView_.delegate = self;
[bannerView_ setRootViewController:self];

[self.view addSubview:bannerView_];
[bannerView_ loadRequest:[self createRequest]];
// Use the status bar orientation since we haven't signed up for
// orientation change notifications for this class.
[self resizeViews];
}



Performance Considerations

Notice the addSubview: in initGADBanner:. Why did we add the GADBannerView directly to the RootViewController’s hierarchy instead of the cocos2d scene’s hierarchy? cocos2d scenes are OpenGL views, whereas our GADBannerView is a UIWebView wrapped in a native UIView. OpenGL views will usually be refreshed often, whereas our GADBannerView will be mostly static. Placing our GADBannerView on top of the OpenGL view therefore can lead to a performance decrease as the device will have more drawing to do.



You can test if this performance decrease is significant for your specific project by logging the frame rate when you place the ad within the OpenGL view and outside of it. The performance cost is usually only significant when you are dealing with very complex hierarchies.




View Layout

Since we’ve decided to place our GADBannerView into the RootViewController’s view hierarchy, we also need to now make sure to resize our cocos2d view to make space for our GADBannerView. The resizeViews: in initGADBanner: is called for this purpose. The implementation for resizeViews: is below. The main OpenGL view which encompasses all of the cocos2d scenes can be grabbed using the +sharedDirector object. The code below assumes you’re going to display the ad at the top of your screen, and have a device that’s in landscape.





- (void)resizeViews: {
// If the banner hasn't been created yet, no need for resizing views.
if (!bannerView_) {
return;
}
// If ad is not showing, no need to resize views.
BOOL adIsShowing = [self.view.subviews containsObject:bannerView_];
if (!adIsShowing) {
return;
}

// Frame of the main RootViewController which we call the root view.
CGRect rootViewFrame = self.view.frame;
// Frame of the main RootViewController view that holds the cocos2d view.
CGRect glViewFrame = [[CCDirector sharedDirector] openGLView].frame;
CGRect bannerViewFrame = bannerView_.frame;
CGRect frame = bannerViewFrame;
// The updated x and y coordinates for the origin of the banner.
CGFloat yLocation = 0.0;
CGFloat xLocation = 0.0;

// Move the root view underneath the ad banner.
glViewFrame.origin.y = bannerViewFrame.size.height;
// The superView has not had its width and height updated yet so use those
// values for the x and y of the new origin respectively. The game is in
// landscape.
xLocation = (rootViewFrame.size.height -
bannerViewFrame.size.width) / 2.0;

frame.origin = CGPointMake(xLocation, yLocation);
bannerView_.frame = frame;


// The super view's frame hasn't been updated so use its width
// as the height. Assume device is in landscape.
glViewFrame.size.height = rootViewFrame.size.width -
bannerViewFrame.size.height;
glViewFrame.size.width = rootViewFrame.size.height;

[[CCDirector sharedDirector] openGLView].frame = glViewFrame;
}



With that, you should now see AdMob ads show up in your cocos2d application. Look out for a follow-up to this blog post where we will discuss how to handle autorotation. As always, feel free to direct any questions you have to our forum or join us for our upcoming hangout.





Introducing the Multi-Channel Funnels Reporting API

Measuring how marketing efforts influence conversions can be difficult, especially when your customers interact with multiple marketing channels over time before converting. Last fall, we launched Multi-Channel Funnels in Google Analytics, a new set of reports that help shed light on the full path users follow to conversion, rather than just the last click. One request we’ve had since the beginning was to make this data available via an API to allow developers to extend and automate use cases with the data. So today we’re releasing the new Google Analytics Multi-Channel Funnels Reporting API.



The API allows you to query for metrics like Assisted Conversions, First Interactions Conversions, and Last Interaction conversions, as well as Top Paths, Path Length and Time Lag, to incorporate conversion path data into your applications. Key use cases we’ve seen so far involve combining this conversion path data with other data sources, such as cost data, creating new visualizations, as well as using this data to automate processes such as bidding.



For example, Cardinal Path used the new Multi-Channel Funnels API, Analytics Canvas ETL (Extract, Transform, Load) and Tableau Software to help their client, C3 Presents, uncover how time and channels affected Lollapalooza ticket sales in an analysis dubbed “MCF DNA.” The outcome was a new visualization, similar to a DNA graph, that helped shed light on how channels appeared throughout the conversion funnel.






MCF DNA Visualization in Tableu Software





In another case, Mazeberry, an analytics company from France, helped their client 123Fleurs decrease customer acquisition costs by 20% by integrating data from the Multi-Channel Funnels API into a new reporting framework. Their application, Mazeberry Express, combines media cost and full conversion path data to provide new Cost Per Acquisition (CPA) and Return on Investment (ROI) metrics that provide a more complete understanding of how online channels are working together to influence conversions.






Mazeberry Express Screenshot - Focus on a Channel





Please note that this functionality only works with the new v3.0 API libraries, so you should upgrade now if you haven’t already (see our migration guide). We look forward to seeing how you make use of this new data source.







Monday, July 30, 2012

Socialize and grow your blog with Google+



Blogger lets you share your thoughts, grow your readership, and engage with your audience. But we want to make Blogger even better by letting you tap into the growing Google+ community. Today, we’re adding a new “Google+” tab in the Blogger dashboard, so you now have a central place to start growing your blog with Google+. This means you can now:

Connect your blog to a Google+ profile or page
If you blog under your own name, you’ve already been able to associate your blog with your personal Google+ profile.  Starting today, you can now connect your blog to a Google+ page for your brand, business or organization.


Notify followers when you publish, and let them recommend your content
Each time you post on your blog, we'll show you a Google+ share box to let you notify followers that you have new blog content.  If they like what you share, followers can +1 or reshare your post to their own friends on Google+. This ripple effect exposes links to your content to a wider audience.




Build enduring connections with your audience
Adding the Google+ gadget to your blog makes it easy for people to add your profile or page to their circles when they like something you’ve published. Forming connections with readers that last after they've left your blog is essential.  

To get started, click the “Google+” tab in the Blogger dashboard and then the “Upgrade” button. If you’ve already upgraded to Google+, we’ll help you associate your blog with your profile or page.




We'll be introducing more settings on this tab in the future, so stay tuned for additional ways to get more out of Blogger with Google+.  If you have questions, you can learn more in our Help Center.

Doubling down on mobile in DoubleClick for Publishers

66% of the population accesses the Internet every day on their smartphone (source: Google and Ipsos Our Mobile Planet: Understanding the Mobile Consumer, May 2012), and never leaves home without their device(s).

The prevalence of mobile devices enables users to constantly connect to a publisher’s content, whether on-the-go, at work, or on the couch at home.

For a publisher’s advertising business, this means display advertising has needed to evolve from purely ads in web browsers, to ads across all screens and devices. You have to help advertisers connect with your audience in whatever setting and on whatever screen they're consuming your content.

At the heart of DoubleClick for Publishers (DFP), we've built a single platform that enables publishers to seamlessly manage all of their digital advertising under one roof. In the most recent release of DFP, we’re excited to bring even more DFP desktop features to mobile so that trafficking a campaign to your website is no different to trafficking a campaign to your mobile site and application. New features include:



  • Frequency capping: You can now enforce frequency caps on mobile web sites and in mobile applications. Frequency caps can be applied to mobile campaigns and to mobile ad units, allowing you fine-grained control over the advertiser and user experience.

  • Suggested ad units: You can now create mobile ad units by approving suggestions generated from actual traffic. This saves you time by automatically creating ad units in advance, while still maintaining control over your overall inventory structure.

  • Multiple sizes for ad units in applications: You can now create ad units with multiple sizes in applications, allowing you to sell high-value custom sizes without compromising your ability to deliver standard banners or use ad networks.

  • Data transfer for mobile: If you are using the data transfer beta, you will now have access to mobile-specific reporting data, including device, carrier and OS information.




In addition to bringing the best-in-class desktop functionality of DFP to mobile, we recognize that mobile is indeed different, and presents publishers with unique advertising opportunities not found on desktop. To help publishers capitalize on new opportunities and the uniqueness of mobile, we’ve recently released the following mobile functionality:


  • SDK mediation: You can now connect with major in-app advertising networks, including iAd, via the networks’ own SDKs. You can choose which SDKs to include in your application with our adapter-based approach, minimising application size and giving you control over updates. You also have the option to serve ads from a sequence of ad networks to maximize fill rates and improve RPMs.

  • App events: You can now provide a custom advertising experience by extending the Google AdMob SDK. Creatives can pass messages to the application, allowing the application to respond (for example, to change the background color). This enables truly integrated ad formats while still using the SDK to do the heavy lifting.

  • Support for pre-loading ads: You can now pre-load ads from DFP Mobile. This enables you to improve the user experience, whether to mitigate the effect of slow mobile connections, or to match the smooth user experience of the rest of your application.





With DFP, we’re committed to giving publishers the tools they need to seamlessly manage and deliver all of their digital advertising in order to take full advantage of the multi-screen world. 



See a preview of the bids for a bid strategy

We recently announced the launch of the Target bid column in DoubleClick Search (DS) reporting, which shows you the bid that DS would have used if there were no secondary constraints in the keyword’s bid strategy. Here’s a way you can use the column to get a preview of the bids in a bid strategy, so you can feel confident that it will result in a solid return on your investment.

You’ve heard about all the great things DS has been doing to improve the Performance Bidding Suite, both in the UI and behind the scenes with improved algorithms. You’re ready to try a bid strategy, but you’d love to have some idea as to what DS is going to bid before giving over full control. Based on your bid strategy settings, how is DS going to bid on your keywords?

To get an idea, just follow these steps:



  1. Create your bid strategy and apply it to some keywords.

  2. When applying the min and max bids for the selected keywords, set a tight bid range that you’re comfortable with. For example, you could set the bids so they match the range of max CPCs, as shown in the following example:

  3. Let the bid strategy run.
    The bid strategy won’t be able to update the bid beyond the tight min and max bid limits, but it will update the
    Target bid column.

  4. Navigate to a Keywords page that contains the keywords in the bid strategy.

  5. Filter to the keywords in the bid strategy.

  6. Above the performance summary graph, click Columns and then select the Target bid column.

  7. Review the target bids. If they look reasonable, relax the bid limits to give more control to the bid strategy. In the following example, you may want to set your min bid to $5.00 and max bid to $60.00 for the keywords, to ensure that the Performance Bidding Suite has the room to set the target bids.



After you give the bid strategy control, remember that you can use Change History to gain insights into bid strategy changes with a summary of the bid rationale. In addition to the target bid, this feature lets you know how often bids are evaluated and provides details on why a change was made to a target position strategy. You also receive guidance on how to improve bid strategy performance by discovering where settings like max bid inhibit the bid changes. Learn more.

Posted by the DoubleClick Search team

Announcing Google App Engine education awards

In addition to the startups and businesses we frequently highlight on our blog, we have seen educational institutions and their students build amazing applications, using Google App Engine as a platform for teaching and groundbreaking research.



Earlier this year we announced funding for researchers looking to use App Engine for scientific discovery. Today we are introducing the Google App Engine Education Awards to foster continued innovation from educational institutions in areas outside of research. Through this program we are inviting faculty members, initially from the United States, to submit proposals for using App Engine for their course development, educational research, university tools or for student projects. A selection of the proposals we receive will receive $1,000 in App Engine credits to assist in making the proposal a reality.



App Engine allows you to build scalable applications using the same technology that powers Google’s global-scale web applications. With no hardware to setup, App Engine makes it simple to learn how to write a simple web application or to build an application that handles millions of hits a day. If you haven’t already tried App Engine, we encourage you to download the SDK, follow the Getting Started Guide and take advantage of our free tier to deploy your first application.



If you teach at an accredited college, university or community college in the United States, we encourage you to apply. You can submit a proposal by filling out this form. Applications must be received by midnight PST August 31, 2012.





- Posted by the Google App Engine Team

Sunday, July 29, 2012

OS X Mountain Lion Hompage

With random endless changing OS X Mountain Lion Backgrounds

Safari
Safari is the default browser on Mac OS X. A while ago it was also ported to Windows. It’s one of the finest browsers around, but sadly underused. If you belong to the Safari-minority, this section is for you.
  1. If you’ve got a Mac, open the Safari dropdown menu and select Preferences… at the top-left of the browser.
  2. If you’ve got Windows, open the Edit dropdown menu and select Preferences… at the top-left of the browser.
Both in Windows and Mac, you can change your homepage in the General tab. You can choose how to open new pages — blank, or with a homepage — and type in the address of your favorite site. Additionally, you can also choose to use the address of the page you’re currently visiting.

While you’re at it, you can also tell Safari what to do upon opening new tabs. Top Sites, one of the best features in Safari, is default, but perhaps you still prefer to use your homepage.


Opera
Opera is – sadly – one of the lesser used browsers, even though it’s got remarkable charms and has introduced numerous innovations in the browser market. If you’re amongst the fine men and women using this slick competitor, this section is for you.
  1. At the top of the browser, open the Tools dropdown menu and select Preferences.
  2. In the General tab, you can configure your homepage. Either type in the address you want to use, or choose to use the currently active page as homepage.
Alternatively, you can configure Opera to launch with a blank page, the startup dialog, or with the tabs of last time’s session.


Firefox and Firefox-based Browsers
Firefox is not just the acclaimed geek-browser anymore. These days, it’s the most used browser in the internet market. As such, that is where we’ll start. Note that any menu-names might have to be translated to your own language, but any changes should be obvious.

How to Set Browser Home Page ?
In the top left of your browser, open the Edit menu and select Preferences.
In the Main tab, you can change your default homepage.
You can also configure Firefox to load with a blank page, or to restore your last session.

When you start typing in the text-field, Firefox will make suggestions based on your history. Alternatively, you can also use the address of the webpage currently active in your browser, one of your bookmarks, or restore the default Firefox Start page.

You can add multiple home pages — which will launch in tabs upon opening firefox — by putting vertical slashes between the links. (e.g. “http://mac--desk.blogspot.com | http://www.google.com”)

This will work with Firefox, but also with Firefox-based browsers, like Flock, Wyzo, and many others.


Internet Explorer (IE7 and IE8)
Microsoft’s Internet Explorer might be loathed by many, but one can’t ignore the fact that it takes a worthy second as most used browser. And thus we go on. The differences between Internet Explorer 7 and 8 are superfluous for this tutorial.

Option 1
In the top right of your screen, open the Tools dropdown menu and select Internet Options.
In the General tab, you’ll be able to set the browser home page to one of your liking. Similar to Firefox, you can use the address of the currently active page, the default start page, or a blank page.
If you want Internet Explorer to open multiple pages upon launch, you  need to type the different addresses in the text-box, below each other.

Option 2
There’s a second way to configure your home page. First, surf to the webpage you want to use.
Next, open the dropdown menu next to the Home button, and select Add or Change Home Page…
A new window will pop up. You can choose to replace your current home page by the current address, or to add the webpage to your current bookmarks.
In Internet Explorer 8, you can also use the current tab set (all your open pages) as homepages.


Google Chrome
Chrome‘s one of the new guys on the block, but a relatively popular browser, taking in account its short time with us. If you like Google’s browser of simplicity, this part is for you.
In the top-right corner of the browser, open the wrench dropdown menu and select Options. Go to the Basics tab, here you can configure your homepage.

Option 1
Make sure that ‘Open the following pages’ is selected in the startup section near the top of the page.
In the box below, you can add multiple web addresses to be opened upon browser launch. If you want to open a blank page, you’ll have to enter ‘about:blank’, manually.

Option 2
Make sure that the ‘Open the home page’ is selected in the startup section near the top of the page.
In the Home Page section, you’ve got two options. Either use the New Tab Page — which is selected by default — or enter a custom address in the text-field.

Friday, July 27, 2012

Hangouts can be even more interactive

We think that there are few things in life more awesome than being able to turn yourself into a unicorn and catch falling donuts on your horn. That’s one of the reasons we love Donut Horns, a game that B-REEL created using the Google+ Hangouts API.



Through the API, anyone can customize the intimacy and collaborative spontaneity of Hangouts: Custom hats, name tags, or glasses for your brand. Trivia challenges. Sing-alongs. You name it. Users can control aspects of an app with their bodies, sport custom media effects, play group games, and collaborate in real time. And you can make this easy: The Google+ Hangout button is easy to install on your site, and can launch a Hangout with your app pre-loaded.







Over 200 apps have been created so far -- from the useful ones, like Lower Third (which gives Hangout participants newscaster-like nameplates) to the fun ones, like the reality show trivia game that BRAVO made for Watch What Happens Live. (Some G+ fans have created a great directory for them.) Apps make Hangouts even more engaging -- one in three Hangouts now use apps, and the average duration of a Hangout increases 2.5 times when an app is used.



Sound interesting? Here’s a one-sheeter that we’ve made about Hangout Apps so that you have a quick guide for your colleagues and clients. But if you’re even more curious, we regularly host Google Developer Office Hours via Hangout to offer answers to questions and 1:1 advice. Check out our schedule and see what’s coming up.



And if you want to see some Hangout App action, here’s a video from our friends at The Webby Awards from the backstage Hangout at their annual awards show in May. Pirate hats and scuba masks sure make video conversations a little more interesting.







Posted by Caro McCarthy, PMM, Google+ for Business

A simpler way to re-connect with your website visitors

Google Analytics has always provided powerful tools to help you better understand your website visitors and improve their experience. Some of you have also started using insights from your website to optimize your remarketing campaigns and re-engage customers who have visited your site. But this has traditionally required you to add a second tag to your site for remarketing, in addition to your existing Google Analytics tag. To simplify the process, we’re rolling out Remarketing with Google Analytics in beta, to help you make the most of those valuable insights.





Remarketing with Google Analytics helps you create remarketing lists based on certain audiences who visit your website and show interest in your products, without having to tag your site twice. This can help you more easily create remarketing campaigns to show ads across the Google Display Network (GDN). 











We’ll be rolling this beta feature out in waves by the end of the summer to all Google Analytics users who are account administrators with at least one linked Google AdWords account. Once the feature is available to you, you can learn about the steps to enable it in your account by clicking on the "Admin" tab in the upper right corner of Google Analytics, then look for the tab for "Remarketing Lists.”












Remarketing can help improve the relevancy of the ads that users see online. We’re also committed to giving users increased control over the ads they see on Google and across the web with tools like Mute This Ad, the Ads Preferences Manager, and the Google Analytics Opt-out.





To learn more about Google’s suite of remarketing tools, please visit the AdWords blog here.





Happy analyzing... and happy remarketing!





Posted by Jesse Savage, Product Manager


Thursday, July 26, 2012

Analytics Advocate Justin Cutroni Answers Your Burning Questions (Part 2)

A version of the following post originally appeared on Justin Cutroni’s Analytics Talk blog.




It’s that time again! Time to take your analytics questions (via Google+) and provide a useful answer.





This edition includes information about such topics as:


  • Tracking across an iFrame

  • A bug with the Ad Content secondary dimension

  • Integrating Google Analytics and Google AdSense

  • Ecommerce reporting based on item category/group



Your Analytics Questions, answered:


Cross-Domain iFrame Question from Michael Walker:





Implementation Question – I have 2x domains lets call them dom1.comand dom2.com – each have a their own Google Analytics (GA) account.




The problem I am having though is that is as follows – we have a form on dom1.com that is pulled in from dom2 via an i-frame. the code within the form fires off 2x custom variables to its dom2 GA account. The outer frame on dom1 fires off all the incoming traffic sources and more importantly the campaign data.





Now what I need to do is I need to have the dom2′s GA account filled with the same campaign values – so that I can tie the campaign names to the 2x custom variables. Now I do have some restrictions that forbid me to set the custom variables to dom1′s GA account as even though this would be the simplest way.





So which of the following options should I go down.





1) Set up on the master frame – a second tracker that fires off the campaign data to dom2′s GA account. Leaving dom1′s GA code in place. Also leaving the code in the dom2s frame as is and hope that the custom variables get set as they are ?





2) Attempt when calling the i-frame page to pass all the campaign data in the URL string and hope that the GA code within dom2 recognises it and passes the campaign data?


I have tried using the GA help + forums to no avail and am really stumped on this one.





Please help Justin… even if its the worst set up ever I have to get it working :-(





Justin’s Answer:





Thanks for the question Michael.





So it sounds like you need to have the campaign data and the custom variable data together, in one account. I’m assuming that the custom variables are visitor level custom variables and are stored in a cookie (which makes it hard to combine them with the other GA data).





The problem with option #1 is that you’ll start to inflate the data in the dom2.com GA account. You’ll have 2 sets of cookies for dom2, thus doubling your visits and visitors.





You could go with option #2: cross domain tracking through an iFrame. But it can be very hard to do because you need to P3P header.





What about an alternate solution? Kind of a “hybrid” solution. Why not pass some special query parameters in the iFrame URL for dom2 and then tweak the GA tracking code on dom2.com to use those parameters?





You can create three query parameters that represent the campaign information in Google Analytics. You can name the parameters anything you want, maybe camp, med and source. You’ll have to populate the variables dynamically. You can mine the data from the the __utmz tracking cookie.









This method will help you avoid cross domain tracking via an iFrame and the overcounting issue.




Canonical URL Tracking Question from Alex Rapp:





What is the best method to track canonical URLs through GA? Utilizing the (opt_pageURL) function or _gaq.push(['_trackPageview', canonical_link]);?




I feel as though they may accomplish the same end result, but seem to go about it in a different manner.




Thanks for your help.





Justin’s Answer:





Thanks for the question Alex.





For those that don’t know what a canonical URL is the one true URL for a piece of content. Many times large sites might have multiple versions of a URL for the same content. Sometimes this can be caused by tracking parameters or other query parameters.





Alex, your idea of passing a URI into the _trackPageview method is a very good one. And it’s a solution that people use all the time. One way that I’ve seen it done is that people will include the URI value in a data layer, then pull that value into the _trackPageview call. It’s a scalable solution that normalizes data.





I’ve also seen people use an Advanced Filter to capture the canonical parts of a URL and re-write the data in Google Analytics. For example, if you’ve got a lot of query parameters, and this causes a lot of duplicate URLs, then you can use an advanced filter, like the one in the image below, to normalize your URLs.






Google Analytics Advanced Filter for normalizing a URL



I personally like the data layer/code approach. It’s more scalable and less susceptible to breaking. But ultimately you’ll need to pick the solution that you can implement.




Ecommerce Tracking Question from Alex Rapp:





I’m having an issue with an ecommerce implementation. During the test phase, I am able to pass through values from the “add_trans” portion of the code, such as: order id & total.




However, I am not seeing anything populate from the “add_item” portion, mainly SKU & quantity.




What am I doing wrong?




Justin’s Answer:





Thanks for the question Alex.





The _addItem code should send back gif requests, one for each item. I would first check the actual gif requests using some type of tool, like Charles, or a browser extension, like the developer tools in Chrome.





Look for GIF requests with utmt=item, this is the item data being sent to Google Analytics.





If you’re not seeing the correct GIF requests sent to the Google Analytics servers then check for syntax errors in the JavaScript. I’ve seen code where a missing comma or some other character will break the JavaScript.


Also make sure that you’re not calling the _trackTrans method before the _addItem method.




Content Grouping Question from Christopher Johnson:





We would like to track page views for individual meta tags on the page, for example, we have a index.html page tagged with Corn, Soybeans and Wheat. What’s the best way to run a report showing all page views for pages tagged with Corn?





We have looked at custom variables but might have pages with 5-10 tags per page.




Justin’s Answer:





Thanks for the question Christopher.





One answer would be to take a look at Google Analytics Premium which provides 50 custom variables.




Another way is, if you need to attach more information to a page, and custom variables are not scaling, you could try to use events or you could add more information into the URL.





I like the event option. You’ve got almost a limitless number of events available and you can create a custom hierarchy that will help you segment the data in different ways. Look to use the Category, Action and Label attributes in creative ways to group your data logically.





I also want to mention that this is a very common request. There are a lot of users, some ecommerce, some publishers, that need to ability to group their content together. And while Custom Vars exist you are limited to 5 per page. The 


Google Analytics team is looking at ways to make this type of functionality better in Google Analytics.





Filtering Question from Eric Bryant:




Is there a glitch in the new Analytics that throws that error when you try to filter by Ad Content? It happens especially when the Primary Dimension is a City or Landing Page, I think.





Justin’s Answer:




Thank for the question Eric.





YES, looks like this is be a bug. Hopefully it will be resolved ASAP.





“Resource Not Available” Question from Dean Shaw:





Justin -


We have been seeing increasing incidences of GA not being available. The exact language is “Resource is not available. Please try again later”.





Related, we have also seen that time out messages when we try and pull data for time-lines longer than a few months.


Finally, when we drill-down on reports we will encounter a flat-line.





This is all in the new interface and cannot be replicated in the old interface where we don’t encounter any of these issues.


Dean





Justin’s Answer:




Thanks for the question Dean.




Whenever you query a large date range, and you have a very high volume of data, you might see some of the effects that you’ve mentioned. The Resource not Available message, while delightfully vague, usually indicates that you’re requesting a HUGE volume of data and that the query is taking a long time to retrieve that information.




I should note that there are a lot of improvements that are happening at Google Analytics right now, many of them have to do with the processing of the data and report generation. Hopefully Resource Not Found will begin to appear less frequently.





(not set) Question from Alaa Batayneh:





Justin,


I have 2 questions.




1) Why do I very often see (not set) whether in traffic sources or any other sections.





2) Is it true that Google Analytics does not record 40% of traffic coming to a site, since it consists of hackers, comment spammers, page scrapper …etc ?





Best,


Alaa





Justin’s Answer:





Thanks for the question Alaa.





Question #1: The value (not set) indicates that a certain dimension of data, like keyword, city, region, etc. can not be identified. For example, if Google Analytics tries to identify a city based on the visitor’s IP address, but the lookup fails, the report will contain a line item for (not set).





Here’s a quick, partial, list of where you might see (not set) and what it means:


  • Geographic reports: (not set) indicates that Google Analytics could not identify the visitor’s geographic location

  • All Traffic Sources: (not set) may indicate that some link tagging parameters are not present. For example, Feedburner often automatically tags links with a source of Feedburner but often omits a medium, thus causing (not set)

  • Page Titles Report: (not set) indicates that the document.title DOM object is not set. This means that GA can not collect the title for the page

  • Devices: (not set) indicates that there is no User Agent that GA can use to identify the device



In addition to “missing” data, (not set) can also indicate that you are trying to combine two dimensions that don’t have any true relationship.





For example, if you are looking at the All Traffic report, and you try to set a secondary Dimension of Keyword, you’ll get (not set) for all of those rows that are not search related (ie referrals, direct, etc.)





Question #2: No, that is not correct. Google Analytics will track the traffic to your site as long as it executes JavaScript tracking code. There are some sampling limits that are imposed on large sites. For example, you are limited to 10M hits/month in the free version of Google Analytics). But Google Analytics does not “pre-qualify” the traffic and drop 40%.





0 Result Searches Question from José Dávila:




Hi Justin,


I hope you are doing well and enjoying your time at Google. I have a couple of questions:




1) Do you know if GA regular expressions support negative look ahead? I am talking about something such as: ^(?!.*string-here)




When I tested it you get an alert. However some forums mention it is possible.




2) How would you track “zero results” searches when you use Google Site Search, given that the CSE results are loaded on an iframe with content from a different domain, so not accessible by traversing the DOM. I have an idea for a solution, however I wanted to know if there is an easier way to do it.




Thanks,


Jose





Justin's Answer:





Thanks for the question Jose.





Question #1: Unfortunately this is not fully supported in the entire Google Analytics interface. And things that are not fully supportedI’d avoid it and look for an alternate solution.





Question #2: This is a hard one. I’m going to assume you’re using a fairly standard implementation of theGoogle Custom Search Engine and that you’re also using the automatic Google Analytics integration.





I believe the Google Custom Search engine uses a dynamically generated DIV, not an iFrame.





When you use the Google CSE and Google Analytics integration the CSE code will generate a virtual pageview for the current page. This virtual pageview will include a query parameter for the search term. You could try to untangle all of the CSE JavaScript code and look for the line that generates the virtual pageview. Unfortunately wading through all the CSE code can be a lot of work!





Another option would be to parse the DOM when a search happens on your site.





When the Google CSE returns zero results there is normally an HTML DIV tag that looks something like this:


No Results





You need to dynamically parse the DOM when someone submits a search and identify the above DIV. You can probably simplify this by using JQuery. If you find the above code then you can send off some data to Google Analytics and record the zero-result search.





In this case, I would probably create an Event rather than use the zero-result tracking technique. The reason is that sending a virtual pageview, with a parameter for the zero-result search, will generate an additional search in the Google Analytics reports. You’ll be double-counting some searches.


Sorry I don’t have the exact code for you. I’d love to hear your solution as well!





Product Reporting Question from Steven Domingue:





I have a question about regular expressions in the Product Performance Report in GA. Is there a character limit in the field where you place the RegEx? I am attempting to do some reporting on product sales associated with emails, banners on my site, etc., and some of the product groupings we feature are basically mini catalogs with 200+ SKUs. I wanted to make sure that if I dump a list of 300 SKUs (between 2500 and 3000 characters) it will capture them all in the report.





Justin’s Answer:





Well, that’s actually a hard question to answer. The standard table filter will not take a regular expression. So you need to use the Advanced filter. This field will take a max of 20 characters. But you can add up to 50 conditions to your filter.


To be honest, creating large, complicated regular expressions in Google Analytics is not scalable. While you can use it for a quick ad-hoc analysis, I would look for a more permanent solution.





What about using the Product Category dimensions rather than the product ID? It obviously depends on if you are setting the product category, but it would totally work.







Google Analytics Product Performance By Category with a Source/Medium secondary Dimension.



Another option might be using a page level custom variable to group your products together into groups? Then use the custom variable in the Product Performance report. It will require some coding, but if you are looking to do this type of analysis a lot it may be worthwhile.





Cross Domain Tracking Question from Rasmus Sellberg:





Justin,


We’re about to cross-domain track a very short and good domain name with multiple subdomains, e.g. www.xx.yy, forum.xx.yy, and so on.





We use _setDomainName(“xx.yy”), and it works like a charm on all browsers but IE.





Unfortunately, IE does not allow cookies on short domains on the form xx.yy (to avoid security issues on all .co.uk sites, for instance). No data at all is recorded for IE browsers…





If we use _setDomainName(“www.xx.yy”), the cookies aren’t available on forum.xx.yy, and vice versa.





What should we do, given that neither using _link everywhere nor changing the domain name is an option? Any best practices for really short domain names?





Thanks,


Rasmus





Justin’s Answer:





Thanks for the question Rasmus.





Yes, this is a known issue and unfortunately there is no good solution. It’s a limitation of Internet Explorer…. insert snarky comment here.





Unfortunately you don’t have many options. You can use _link on all of the URLs. And if it’s a big site you may want to use some type of JQuery auto tagging script. Or the other solution is to move the sub-domain content to subdirectories on the main domain. This may be very hard to do, but at least you avoid all the JavaScript coding.





I also want to mention that the Google Analytics team is working on a new solution to cross domain tracking that will solve this problem. It will also make cross-domain tracking better for the entire world :)





AdWords Metrics Question from Ties.com:







When viewing our adwords campaign data in Google analytics our Advertising Cost metric is reporting correctly, but when we try to create a custom keyword level report in GA the cost metric is all zeros? Are we unable to track adwords cost data at the keyword level in GA? 








Justin’s Answer:





Thanks for the question.





You should be able to use AdWords metrics, like cost, CTR and CPC, in GA custom reports. I’ve done it as recently as today.





BUT, cost metrics can only work with a few dimensions, mostly the AdWords related dimensions. If you are trying to use any dimensions that are NOT AdWords dimensions you might get all zeros.





AdSense Question from Reid Simonton:





I may be a bit late, but have to ask as this is an issue I’ve been struggling with for 2+ years – linking our AdSense account to our Analytics account. I understand the process, however here’s what I actually see:





1. Go to Content > AdSense > Overview in GA, see “This report requires AdSense to be enabled for this profile”. Hmm, I’ve already done that.





2. But I’ll try again – click the link provided there for the instructions. Instructions state, “Open either the Overview or Advanced Reports page, and find the link that invites you to integrate your accounts”, but there is no such link in the AdSense panel (presumably because I’ve previously gone through this step). Instead I see a link in the upper right corner of AdSense stating, ” View performance in Google Analytics”. Would seem to indicate the accounts are linked, right?





3. Click that link, it takes me to my Analytics home page (showing my two profiles). I go into the one I’ve attempted previously tried to link w/ AdSense, and (repeat step 1, above).


Something’s clearly broken. Been trying to resolve this for years, have posted bunches of forum posts, etc., but no luck. Incredibly frustrating! Any assistance would be enormously appreciated.


Thanks





Justin’s Answer:





Thanks for the question Reid.





I’ve seen that problem before. An infinite loop and it can be frustrating!





1. Log into GA. Make sure you log in with the same account that you use to access AdSense.


2. Go to the Admin section


3. Click on the Data Sources tab for your account and look for the AdSense section.


4. Click on the Link Account button. You should get a little window that asks which account and profiles you want to apply your AdSense data to.







Connecting Google AdSense and Google Analytics

The AdSense code and Analytics code MUST be installed on all the same pages. If you do not have the Google Analytics Tracking code on all pages that have the Adsense code, page impressions and clicks cannot be accurately recorded.





AdWords Auto Tagging Question from Steven Nguyen:





Justin





I have 2 questions on about Analytics.





1. I have autotagging set up and someone wants to add parameters to the ad as well. Would the new parameters override the autotagging or mess up the reporting in anyway?





2. I want to track lead submissions, sign ups, etc…but it does not redirect you to a “thank you” page after you complete the action, a dialog box pops up. I want to use a destination goal but the dialog box does not change URLs. Is there a way to track it as a goal without adding a “thank you” page?


If you could help, that would be great. Thanks.





Steven





Justin’s Answer:





Thanks for the questions Steven.





Question #1. No, AdWords auto-tagging will work with your existing parameters. The Google Analytics auto-tagging parameter, named gclid, will play nice with your existing query parameters :)





Question #2. Yes, there are ways to work around a thank-you page that does not have a unique URL.





I’m going to make the assumption that when someone submits a form the page does change. It’s just the URL that stays the same. In this scenario you have a couple of options. Choose the one that works best for you.





You can use an Event to track this new window, and then set that event up as a goal. An event is a way to track visitor interactions with your site.





You’ll need to add some additional JavaScript to track when the window pops open. It might look something like this:


_gaq.push([‘_trackEvent’, ‘Goals’, ‘Submit Form’, ‘Lead Form’, 100]);





In the above code the value of 100 is the value of the lead form. That’s something that I arbitrarily chose. But if you can do some lead scoring, and enter that data into the code, then you’ll get some AMAZING revenue metrics in Google Analytics.




Once you have the code on your site you can use the Event data to your goal. For the above event, the goal settings would be something like this:




Setting up an Event as a Google Analytics Goal



Thanks everyone! Those were great. What a variety of questions. Stay tuned, we’ll do this again next month -- be sure to circle Google Analytics on Google+ to find out when you can ask a question.







Posted by Google Analytics Advocate Justin Cutroni