Multiple custom variables
jmesam - October 20, 2009 - 20:43
| Project: | Google Analytics |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Description
Hi!
Today Google Analytics team announced a new set of features. There are 2 of them that could be included in future releases of GA module:
1. Expanded Mobile Reporting: Google Analytics for mobile
2. Multiple Custom Variables: more info
I'm very excited about multiple custom variables, imagine the power of drupal plus the level of segmentation we could get with all those variables...

#1
Oops, I forgot to mention that Google Analytics for mobile link it is a compress file (zip).
More info about Multiple Custom Variables: http://code.google.com/intl/es-ES/apis/analytics/docs/tracking/gaTrackin...
#2
Google Analytics for mobile!
#3
Mobile Apps tracking seems not related to Drupal, see http://code.google.com/intl/en/apis/analytics/docs/tracking/mobileAppsTr.... It's more for Apps on Phones...
Multiple custom variables sounds very helpful and promising...
#4
#5
Google Analytics for mobile it is not the same that Mobile Apps tracking, GA for mobile it's for website not apps, and consists of server-side tracking for mobile sites that use JSP, PHP, ASP.NET, or Perl as their server-side language. This allows tracking on mobile websites that receive traffic from phones that do not support the JavaScript-based tracking usually used by Google Analytics.
#6
Ah, ok. Lets split this in two issues, please.
#7
Google Analytics for Mobile should not be implemented on the pages which already have ga.js. See known issues in the readme.pdf
More important, GA for Mobile adds server load, therefor, it should be used only on the pages that are for mobile access/traffic. Otherwise, too much overhead.
Having said that, it's very hard for GA module to decide whether to generate ga.js or to include php.snippet on a specific page, since GA module won't know how a page is accessed.
But, we have Services Module, which is used for mobile and flash access. It would make much sense, if GA module could develop a Services include, so the Services Module could call GA for Mobile.
#8
We can use the browser detect module (cannot remember the module name) and only use the mobile GA tracking in such a case. I'm often surfing on sites with my iPhone and I think there are good reasons not to limit this to directories... Never thought much about this yet, but at least the iPhone shouldn't have issues and require a real change to logic. Not 100% sure, but it sounds like this only stops downloading of the JS stuff and that's it. This wouldn't add much more load the ga module as today.
We should nevertheless split this in a new case. This one here for the setVar stuff (we need a patch), and the other case for implementing the (optional) mobile feature.
#9
I'm really asking me who is using a browser that is not able to use javascript... iPhone, Windows Mobile can execute JavaScript. Not sure about Blackberries, but they should also work or the internet on mobile devices makes really no sense... many years the mobile phone manufacturers thought they can get us on to bad WAP bad stuff... but the customers haven't used it - why should we waste time for a feature used by 0.000001% (I may have missed a few more zeros) of the internet users???
#10
All browsers on modern phones support JS; GA for Mobile is developed for service based application or other cloud computing sites; the remote client access those remote services Not through browsers, therefore javascript won't be executed. That's where the GA for Mobile should come in and shift the burden to the server. As I proposed earlier, it would make more sense, if GA module could make a GA for Mobile include file for Drupal Services Module.
#11
This is not logic. Cloud sh** or not the JS ga tracking works. I do not see any real world drupal example...
#12
Hi,
This thread seems to have gone off topic a bit but to bring it back to multiple variable support...
Does anyone know if there are any plans to add support for _setCustomVar? I've seen a number of requests for adding hooks to provide more flexibility to the current _setVar implementation. I think with _setCustomVar it's essential that it's hook based - I can't see that the "one size fits all" approach currently employed for _setVar will ever work for _setCustomVar.
I need this new feature fairly quickly. Would there be any interest in me providing a patch to add support for this? If nothing else at least it might start the ball rolling....