From 22de793422fa15775008b5f7132c619599e87983 Mon Sep 17 00:00:00 2001 From: Nathan Adams Date: Mon, 10 Mar 2014 22:34:32 -0500 Subject: [PATCH] Updating google analytics in Pluf framework --- pluf/src/Pluf/Middleware/GoogleAnalytics.php | 24 ++++++++++++-------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/pluf/src/Pluf/Middleware/GoogleAnalytics.php b/pluf/src/Pluf/Middleware/GoogleAnalytics.php index 0a1a9a7..839f37d 100644 --- a/pluf/src/Pluf/Middleware/GoogleAnalytics.php +++ b/pluf/src/Pluf/Middleware/GoogleAnalytics.php @@ -43,8 +43,8 @@ class Pluf_Middleware_GoogleAnalytics if (!Pluf::f('google_analytics_id', false)) { return $response; } - if (!in_array($response->status_code, - array(200, 201, 202, 203, 204, 205, 206, 404, 501))) { + if (!in_array($response->status_code, + array(200, 201, 202, 203, 204, 205, 206, 404, 501))) { return $response; } $ok = false; @@ -58,14 +58,20 @@ class Pluf_Middleware_GoogleAnalytics if ($ok == false) { return $response; } - $js = ' -'; +EOT; $response->content = str_replace('', $js.'', $response->content); return $response; }