aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.inc.php.example2
-rw-r--r--templates/bottom.inc.php15
-rw-r--r--upgrade.txt1
3 files changed, 17 insertions, 1 deletions
diff --git a/config.inc.php.example b/config.inc.php.example
index 02ec288..7a5fff1 100644
--- a/config.inc.php.example
+++ b/config.inc.php.example
@@ -92,5 +92,5 @@ $enableAdminColors = true; #Enables special colors on admin pages and bookmarks
$descriptionAnchors = array("author", "isbn", "address"=>"[address][street][/street][city][/city][/address]"); #add a possible anchor (structured content) for bookmarks' description field
# a simple value "xxx" (like "author") automatically associates xxx with [xxx][/xxx].
# a complex value "xxx"=>"yyy" (like "address") direclty associates xxx with yyy.
-
+$googleAnalyticsCode = ''; #Allow GoogleAnalytics tracker https://www.google.com/analytics/
?>
diff --git a/templates/bottom.inc.php b/templates/bottom.inc.php
index 4ad9618..9fb2306 100644
--- a/templates/bottom.inc.php
+++ b/templates/bottom.inc.php
@@ -12,5 +12,20 @@ if($GLOBALS['enableWebsiteThumbnails']) {
</div>
+
+<?php if(isset($GLOBALS['googleAnalyticsCode']) && $GLOBALS['googleAnalyticsCode']!= ''):?>
+
+<script type="text/javascript">
+var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+</script>
+<script type="text/javascript">
+try {
+var pageTracker = _gat._getTracker("<?php echo $GLOBALS['googleAnalyticsCode']?>");
+pageTracker._trackPageview();
+} catch(err) {}</script>
+
+<?php endif;?>
+
</body>
</html>
diff --git a/upgrade.txt b/upgrade.txt
index 485e3e0..6947257 100644
--- a/upgrade.txt
+++ b/upgrade.txt
@@ -96,6 +96,7 @@ ALTER TABLE `sc_searchhistory` CHARACTER SET utf8 COLLATE utf8_general_ci;
- Upgrade your current configuration file (config.inc.php) with respect to config.inc.php.example
* Add variable : $descriptionAnchors = array("author", "isbn", "address"=>"[address][street][/street][city][/city][/address]"); #add a possible anchor (structured content) for bookmarks' description field
* Add variable : $enableCommonTagDescriptionEditedByAll = true; #true mean everybody can edit common description. Else just the admins can do it.
+* Add variable : $googleAnalyticsCode = ''; #Allow GoogleAnalytics tracker https://www.google.com/analytics/
=== From version 0.90 to 0.91 ===
- Backup you database