Skip to content

Commit

Permalink
Ensured correct locale format for "utmul" parameter
Browse files Browse the repository at this point in the history
git-svn-id: http://php-ga.googlecode.com/svn/trunk@20 edaf56f0-51c5-75dc-8b6c-d0dc49a406ca
  • Loading branch information
mail@thomasbachem.com committed Oct 31, 2011
1 parent e505232 commit a5ec253
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/GoogleAnalytics/Internals/Request/Request.php
Expand Up @@ -156,7 +156,9 @@ protected function buildParameters() {
* @return \UnitedPrototype\GoogleAnalytics\Internals\ParameterHolder
*/
protected function buildVisitorParameters(ParameterHolder $p) {
$p->utmul = strtolower($this->visitor->getLocale());
// Ensure correct locale format, see https://developer.mozilla.org/en/navigator.language
$p->utmul = strtolower(str_replace('_', '-', $this->visitor->getLocale()));

if($this->visitor->getFlashVersion() !== null) {
$p->utmfl = $this->visitor->getFlashVersion();
}
Expand Down

0 comments on commit a5ec253

Please sign in to comment.