]> gitweb.fluxo.info Git - semanticscuttle.git/commitdiff
New Feature: add Google Analytics Code in config file [Config file modified: googleAn...
authormensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>
Tue, 10 Feb 2009 14:13:02 +0000 (14:13 +0000)
committermensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>
Tue, 10 Feb 2009 14:13:02 +0000 (14:13 +0000)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@267 b3834d28-1941-0410-a4f8-b48e95affb8f

config.inc.php.example
templates/bottom.inc.php
upgrade.txt

index 02ec288ac4782b6863b99a116c0edb7f1c805fff..7a5fff163ad495de648753813125c47bbb70ce9b 100644 (file)
@@ -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/
 ?>
index 4ad9618798de23912c69ac25bc459b0da8273e5c..9fb2306545aeb6b3cc72a679e960a053d9ee0759 100644 (file)
@@ -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>
index 485e3e000c7e11f29ce6ae2cda4fdd98eb13d310..6947257f93946df2b8d114853f31fe569613c31e 100644 (file)
@@ -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