Google Ad Tracking 404

3 posts by 2 authors in: Forums > CMS Builder
Last Post: September 12, 2016   (RSS)

By theclicklab - September 11, 2016

Seems the custom filter I have setup is breaking when tracking from google ad tracking is added (&gclid=)....

With tracking creates a 404:
http://www.luxurychartergroup.com/yacht-type.php/gulet-4/?gclid=CPWlrPbzhc8CFYOSvQodjgcKHw

Without gclid:
http://www.luxurychartergroup.com/yacht-type.php/gulet-4/

Any suggestions? See attached code.

CMS is latest version: v3.06 (Build 2101)

Many thanks
Jan

Attachments:

yacht-type.php 14K

By jenolan - September 11, 2016

//New function to get the yatch type variable now we've added pages.
  $recordNum = 1;
  foreach($_REQUEST as $key => $item){
    if($key != 'page' && $key != 'sort' && strpos($key, 'utm') === false){
      $recordNum = preg_replace("/[^0-9,.]/", "",$item);
      break;
    }
  }


You have overridden the default handler... change this to;

//New function to get the yatch type variable now we've added pages.
  $recordNum = 1;
  foreach($_REQUEST as $key => $item){
    if($key != 'page' && $key != 'sort' && $key != 'gclid' && strpos($key, 'utm') === false){
      $recordNum = preg_replace("/[^0-9,.]/", "",$item);
      break;
    }
  }

---
<?= "Jenolan(Larry) :: Coding Since 1973" ?>
Peace and Long Life