The code in HTML source is like this

<script type="text/javascript" src="http://www.google-analytics.com/urchin.js"></script>
<script type="text/javascript">
_uacct = "UA-1954333-1";urchinTracker();__utmSetVar('易寒飞:易寒飞');
</script>
<script type="text/javascript" src="/modules/google_analytics/downloadtracker.js"></script>

but everything was right in the previous version (1.2)

CommentFileSizeAuthor
#3 google_analytics_encoding_bug.patch773 byteshass

Comments

coldfly’s picture

Is there any suggestion?
When the User Segmentation contains multibyte characters, They will be garbled in the function __utmSetVar()
But they are right in the previous version, So I think there are something missing when upgrading.

hass’s picture

There must be something broken with UTF8 encoding... not sure if GA is the source.

hass’s picture

Status: Active » Needs review
StatusFileSize
new773 bytes

Hard to test for non Chinese :-).

Here is a patch that fixes this bug. "utf8_encode" - Encodes an ISO-8859-1 string to UTF-8, but Drupal is already UTF8, so we must remove this and should be fine. Are you able to verify this? I will try to look why and when this have been added.

hass’s picture

Committed fix into D6 branch.

hass’s picture

Version: 5.x-1.3 » 5.x-1.x-dev
Status: Needs review » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.