SET @acSorter := (SELECT sorter FROM qs_Settings WHERE `name` = 'analyticsCode' LIMIT 1);
SET @gtmSorter := (SELECT sorter FROM qs_Settings WHERE `name` = 'gtmId' LIMIT 1);

UPDATE qs_Settings SET
  `sorter` = @gtmSorter,
  `label` = 'Google Analytics ID',
  `system` = 'n'
WHERE `name` = 'analyticsCode';

UPDATE qs_Settings SET
  `sorter` = @acSorter,
  `description` = 'If this field is left blank then the Google Analytics code with ID below (if any) will be used instead.'
WHERE `name` = 'gtmId';
