Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I was having problems with google analytics not counting most of my users, and I discovered it was because non English characters are not correctly handled. I added some user profile to my analytics and what was appearing in html source code was:
<script type="text/javascript" src="http://www.google-analytics.com/urchin.js"></script><script type="text/javascript">_uacct = "UA-1837700-1";__utmSetVar('2716:enboig:LluÃs Forns i PuigmartÃ::C/Montserrat, 12:SANT SADURNI D'ANOIA:08770::938910235:667077619:19/05/1981:A.E. Sant SadurnÃ:Cap de Pioners/Caravel.les
');urchinTracker();</script>
I supose googleanalytics is the one who should fix this, because when I enter my profile everythins is ok.
Comments
Comment #1
buddaMaybe this is where
comes in to play?
Comment #2
enboig CreditAttribution: enboig commentedI don't understand this solution, I think it should be done with utf8_encode(); or utf8_decode(); somewhere.
Comment #3
buddaI've added utf8_encode to profile values that are output in to the JavaScript segmentation. However I'm not well up on UTF-8 encoding and don't know if this makes it better or worse! The characters appear as a bit of a mess in IE7.
Have a go with the 5.x-dev version of the module. I've committed the change now.
Comment #4
enboig CreditAttribution: enboig commentedAnother problem would be if any field have ' in it; maybe an addslashes would be useful.
And thanks for your work
Comment #5
buddaThanks for your input. Have included an addslashes() on the profile field values now.
Did the UTF8 code work at all?
Comment #6
enboig CreditAttribution: enboig commenteddidn't have time to test, maybe tomorrow. Thanks a lot for your fast response
Comment #7
enboig CreditAttribution: enboig commentedjust tested and it don't work; the code which got written is:
And there should be more data (with ' and non-english characters). I looked at user profile and the user 'enboig' have all the data. Maybe a problem with "user profile" module? the fields appear ok in the configuration menu.
Comment #8
hass CreditAttribution: hass commentedUTF8 is broken... see http://drupal.org/node/178765. I have added a patch there.
Committed fix into D6 branch.
Comment #9
hass CreditAttribution: hass commentedShould be fixed, if not please reopen.
Comment #10
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.