You are here

function uc_googleanalytics_flush_caches in Ubercart 7.3

Check which version of google analytics code is used on the site.

File

uc_googleanalytics/uc_googleanalytics.module, line 18
Adds Google Analytics Javascript to the checkout completion page.

Code

function uc_googleanalytics_flush_caches() {
  $info = system_get_info('module', 'googleanalytics');
  if (preg_match('|7\\.x\\-[2-9]\\.[0-9x]+|', $info['version'])) {
    variable_set('uc_googleanalytics_version', 'analytics.js');
  }
  else {
    variable_set('uc_googleanalytics_version', 'ga.js');
  }
}