Closed (fixed)
Project:
Google Analytics
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
13 Sep 2012 at 17:22 UTC
Updated:
30 Sep 2012 at 22:51 UTC
Per API changes, https://developers.google.com/analytics/devguides/collection/gajs/gaTrac...
"The total combined length of any custom variable name and value may not exceed 128 characters."
Example patch might be:
===================================================================
--- googleanalytics.module (revision 2432)
+++ googleanalytics.module (working copy)
@@ -199,13 +199,13 @@
}
// The length of the string used for the 'name' and the length of the
- // string used for the 'value' must not exceed 64 bytes after url encoding.
+ // string used for the 'value' must not exceed 128 bytes after url encoding.
$name_length = drupal_strlen(rawurlencode($custom_var_name));
$tmp_value = rawurlencode($custom_var_value);
$value_length = drupal_strlen($tmp_value);
- if ($name_length + $value_length > 64) {
+ if ($name_length + $value_length > 128) {
// Trim value and remove fragments of url encoding.
- $tmp_value = rtrim(substr($tmp_value, 0, 63 - $name_length), '%0..9A..F');
+ $tmp_value = rtrim(substr($tmp_value, 0, 127 - $name_length), '%0..9A..F');
$custom_var_value = urldecode($tmp_value);
}
Comments
Comment #1
hass commentedhttp://drupalcode.org/project/google_analytics.git/commit/bd2c0b9
http://drupalcode.org/project/google_analytics.git/commit/7e3ae50
http://drupalcode.org/project/google_analytics.git/commit/e120d56