Viewer problems with Google tracking codes

19 posts by 6 authors in: Forums > CMS Builder
Last Post: July 26, 2010   (RSS)

By jarvis - May 20, 2010

Hi Dave,

How do I upgrade my CMS? Also, if I upgrade, will I then still need to alter some code?

Thanks

Re: [jarvis] Viewer problems with Google tracking codes

By Dave - May 20, 2010

You download the latest version here:
http://www.interactivetools.com/upgrade/

And then follow the upgrade instructions included in the download or online here:
http://www.interactivetools.com/docs/cmsbuilder/upgrade.html

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com

By jarvis - May 20, 2010

Thanks Dave, I'll give that a go. Will I also need to alter the code on the pages? I think Damon was also looking into this for me to see if there was any code that could be used to filter out the utm code from the URL.

Thanks

Re: [jarvis] Viewer problems with Google tracking codes

By Dave - May 20, 2010

Nope, it should just start working normally.
Dave Edis - Senior Developer
interactivetools.com

By jarvis - May 20, 2010

Excellent, I'll download that update, back my live site up (& database) and then follow the instructions

Thanks (& fingers crossed!).

Kindest Regards,

jarvis

Re: [jarvis] Viewer problems with Google tracking codes

By jarvis - May 21, 2010

Hi Dave,

Sadly the upgrade caused the following error on my site:
This program requires the PHP 'mbstring' extension.
Please ask your hosting provider (or server administrator) to install missing PHP extension(s).

Due to our hosting (shared) we're not able to update the php.ini file, adding one into the root also doesn't work as this has been blocked due to security issues. Have restored all the files back to before the upgrade and the site seems ok.

Errr, help????

Many thanks

Re: [jarvis] Viewer problems with Google tracking codes - SOLVED

By jarvis - May 24, 2010

Thanks to Damon for this code, this solved the issue for me & hope it may help others:
Here is some code that you can add to the page to filter out the variables. Note that some of the code needs to be add before the getRedcords function and some code needs to be added after it.

--------------------------------------------------------------------
<?php

$filtered=array();
$filtered_query="";

//Filter
foreach($_REQUEST as $key=>$value){
switch($key){
//keys to filter out
case "utm_medium":
case "utm_source":
case "utm_content":
case "utm_campaign":
continue;
break;
default:
$filtered[$key]=$value;
$filtered_query.=$key."=".$value."&";
break;
}
}

$temp = $_REQUEST; //store $_REQUEST in a temporary variable $temp_query = $_SERVER['QUERY_STRING'];

//set variables to filtered state
$_REQUEST=$filtered;
$_SERVER['QUERY_STRING']=$filtered_query;





$_REQUEST=$temp; //set $_REQUEST back to original state $_SERVER['QUERY_STRING'] = $temp_query; //set query string back to it's original state ?>
--------------------------------------------------------------------

You can also add other variables to filter out if needed.

Re: [jarvis] Viewer problems with Google tracking codes

By Codee - July 26, 2010

For others who get the error 'This program requires the PHP 'mbstring' extension.
Please ask your hosting provider (or server administrator) to install missing PHP extension(s).' and are hosting with GoDaddy (economy or deluxe) and you've upgraded your CMSB from an earlier version. There are 2 (TWO) places in your GoDaddy hosting panel that have to be modified to change the PHP configuration to work:
1) under settings>file extensions, and then,
2) under content>add-on languages. If you don't do both and your hosting with GoDaddy then you'll continue to get this error until you modify both settings.