From 9bbab61835b83240cfc9060b8a1e9f28a95154e2 Mon Sep 17 00:00:00 2001 From: sgiehl Date: Wed, 10 Sep 2014 21:22:08 +0200 Subject: refs #6174 - added possibility to add 'disableCookies' option in tracking code generator --- core/Piwik.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'core/Piwik.php') diff --git a/core/Piwik.php b/core/Piwik.php index 9e53964e60..ccaee84962 100644 --- a/core/Piwik.php +++ b/core/Piwik.php @@ -131,7 +131,7 @@ class Piwik public static function getJavascriptCode($idSite, $piwikUrl, $mergeSubdomains = false, $groupPageTitlesByDomain = false, $mergeAliasUrls = false, $visitorCustomVariables = false, $pageCustomVariables = false, $customCampaignNameQueryParam = false, $customCampaignKeywordParam = false, - $doNotTrack = false) + $doNotTrack = false, $disableCookies = false) { // changes made to this code should be mirrored in plugins/CoreAdminHome/javascripts/jsTrackingGenerator.js var generateJsCode $jsCode = file_get_contents(PIWIK_INCLUDE_PATH . "/plugins/Morpheus/templates/javascriptCode.tpl"); @@ -182,6 +182,9 @@ class Piwik if ($doNotTrack) { $options .= ' _paq.push(["setDoNotTrack", true]);' . PHP_EOL; } + if ($disableCookies) { + $options .= ' _paq.push(["disableCookies"]);' . PHP_EOL; + } $codeImpl = array( 'idSite' => $idSite, -- cgit v1.2.3