UTM Google and other parameter problems

3 posts by 3 authors in: Forums > CMS Builder
Last Post: June 29   (RSS)

By moh3 - June 27

hello, if you may i noticed the UTM tags are missing mandatory parameter, you can use the following tool from Google to fill in the information


here is an example of url: https://www.nalleyfresh.com/order.php?location=2&utm_source=email&utm_medium=email&utm_campaign=huntvalley#/restaurants/nalleyfreshhuntvalley/1063

does this load properly?

By gregThomas - June 29

Hey Everyone, 

The problem was the function whereRecordNumberInUrl(0) would retrieve the number from the request before the internal link, so for the following link:


It would use the value 9 (the final number before the hash and after the question mark) instead of the actual correct location of 2.

I've updated the code on the order page so that if it finds a location request variable, it will use that instead of the last value in the URL. Here is the updated code:

$recordNum = (!empty($_REQUEST['location']))? intval($_REQUEST['location']) : getLastNumberInUrl();

list($locationsRecords, $locationsMetaData) = getRecords(array(
'tableName' => 'locations',
'where' => "`num` = ".$recordNum,
'loadUploads' => true,
'allowSearch' => true,
'limit' => '1',
$locationsRecord = @$locationsRecords[0];
if (!$locationsRecord) { dieWith404("Record not found!"); }



Greg Thomas

PHP Programmer - interactivetools.com