[bknr-cvs] r2351 - in branches/bos/projects/bos: payment-website/templates/da payment-website/templates/de payment-website/templates/en web

hhubner at common-lisp.net hhubner at common-lisp.net
Fri Jan 18 11:14:36 UTC 2008


Author: hhubner
Date: Fri Jan 18 06:14:31 2008
New Revision: 2351

Modified:
   branches/bos/projects/bos/payment-website/templates/da/infosystem.xml
   branches/bos/projects/bos/payment-website/templates/da/profil.xml
   branches/bos/projects/bos/payment-website/templates/da/quittung.xml
   branches/bos/projects/bos/payment-website/templates/da/ring-detail.xml
   branches/bos/projects/bos/payment-website/templates/da/sponsor_canceled.xml
   branches/bos/projects/bos/payment-website/templates/da/toplevel.xml
   branches/bos/projects/bos/payment-website/templates/da/toplevel_extra.xml
   branches/bos/projects/bos/payment-website/templates/da/toplevel_main.xml
   branches/bos/projects/bos/payment-website/templates/da/versand_geschenk.xml
   branches/bos/projects/bos/payment-website/templates/da/versand_info.xml
   branches/bos/projects/bos/payment-website/templates/de/infosystem.xml
   branches/bos/projects/bos/payment-website/templates/de/profil.xml
   branches/bos/projects/bos/payment-website/templates/de/quittung.xml
   branches/bos/projects/bos/payment-website/templates/de/ring-detail.xml
   branches/bos/projects/bos/payment-website/templates/de/sponsor_canceled.xml
   branches/bos/projects/bos/payment-website/templates/de/toplevel.xml
   branches/bos/projects/bos/payment-website/templates/de/toplevel_extra.xml
   branches/bos/projects/bos/payment-website/templates/de/toplevel_main.xml
   branches/bos/projects/bos/payment-website/templates/de/toplevel_news.xml
   branches/bos/projects/bos/payment-website/templates/de/versand_geschenk.xml
   branches/bos/projects/bos/payment-website/templates/de/versand_info.xml
   branches/bos/projects/bos/payment-website/templates/en/infosystem.xml
   branches/bos/projects/bos/payment-website/templates/en/profil.xml
   branches/bos/projects/bos/payment-website/templates/en/quittung.xml
   branches/bos/projects/bos/payment-website/templates/en/ring-detail.xml
   branches/bos/projects/bos/payment-website/templates/en/sponsor_canceled.xml
   branches/bos/projects/bos/payment-website/templates/en/toplevel.xml
   branches/bos/projects/bos/payment-website/templates/en/toplevel_extra.xml
   branches/bos/projects/bos/payment-website/templates/en/toplevel_main.xml
   branches/bos/projects/bos/payment-website/templates/en/versand_geschenk.xml
   branches/bos/projects/bos/payment-website/templates/en/versand_info.xml
   branches/bos/projects/bos/web/config.lisp
   branches/bos/projects/bos/web/startup.lisp
   branches/bos/projects/bos/web/tags.lisp
Log:
Add page tracking with Google Analytics.


Modified: branches/bos/projects/bos/payment-website/templates/da/infosystem.xml
==============================================================================
--- branches/bos/projects/bos/payment-website/templates/da/infosystem.xml	(original)
+++ branches/bos/projects/bos/payment-website/templates/da/infosystem.xml	Fri Jan 18 06:14:31 2008
@@ -17,5 +17,6 @@
 <div id="content_infosystem">
 	<h1 class="extra">Infosystem "satelit kort"</h1>
 </div>
+<bos:google-analytics-track />
 </body>
 </html>

Modified: branches/bos/projects/bos/payment-website/templates/da/profil.xml
==============================================================================
--- branches/bos/projects/bos/payment-website/templates/da/profil.xml	(original)
+++ branches/bos/projects/bos/payment-website/templates/da/profil.xml	Fri Jan 18 06:14:31 2008
@@ -119,5 +119,6 @@
     </table>
    </form>
   </bos:save-profile>
+  <bos:google-analytics-track />
  </body>
 </html>

Modified: branches/bos/projects/bos/payment-website/templates/da/quittung.xml
==============================================================================
--- branches/bos/projects/bos/payment-website/templates/da/quittung.xml	(original)
+++ branches/bos/projects/bos/payment-website/templates/da/quittung.xml	Fri Jan 18 06:14:31 2008
@@ -157,5 +157,6 @@
 			 	</div>
 			</div>
 		</div>
+		<bos:google-analytics-track />
 	</body>
 </html>

Modified: branches/bos/projects/bos/payment-website/templates/da/ring-detail.xml
==============================================================================
--- branches/bos/projects/bos/payment-website/templates/da/ring-detail.xml	(original)
+++ branches/bos/projects/bos/payment-website/templates/da/ring-detail.xml	Fri Jan 18 06:14:31 2008
@@ -24,5 +24,6 @@
 				close window
 			</a>
 		</div>
+		<bos:google-analytics-track />
 	</body>
 </html>

Modified: branches/bos/projects/bos/payment-website/templates/da/sponsor_canceled.xml
==============================================================================
--- branches/bos/projects/bos/payment-website/templates/da/sponsor_canceled.xml	(original)
+++ branches/bos/projects/bos/payment-website/templates/da/sponsor_canceled.xml	Fri Jan 18 06:14:31 2008
@@ -94,5 +94,6 @@
 			 	</div>
 			</div>
 		</div>
+		<bos:google-analytics-track />
 	</body>
 </html>

Modified: branches/bos/projects/bos/payment-website/templates/da/toplevel.xml
==============================================================================
--- branches/bos/projects/bos/payment-website/templates/da/toplevel.xml	(original)
+++ branches/bos/projects/bos/payment-website/templates/da/toplevel.xml	Fri Jan 18 06:14:31 2008
@@ -66,5 +66,6 @@
 		<bknr:tag-body></bknr:tag-body>
 	<!-- /content 3teilig-->
 
+		<bos:google-analytics-track />
 	</body>
 </html>

Modified: branches/bos/projects/bos/payment-website/templates/da/toplevel_extra.xml
==============================================================================
--- branches/bos/projects/bos/payment-website/templates/da/toplevel_extra.xml	(original)
+++ branches/bos/projects/bos/payment-website/templates/da/toplevel_extra.xml	Fri Jan 18 06:14:31 2008
@@ -22,5 +22,6 @@
 				luk vindue
 			</a>
 		</div>
+		<bos:google-analytics-track />
 	</body>
 </html>

Modified: branches/bos/projects/bos/payment-website/templates/da/toplevel_main.xml
==============================================================================
--- branches/bos/projects/bos/payment-website/templates/da/toplevel_main.xml	(original)
+++ branches/bos/projects/bos/payment-website/templates/da/toplevel_main.xml	Fri Jan 18 06:14:31 2008
@@ -152,5 +152,6 @@
 				<bknr:tag-body></bknr:tag-body>
 			<!-- /content 3teilig-->
 		</div>
+		<bos:google-analytics-track />
 	</body>
 </html>

Modified: branches/bos/projects/bos/payment-website/templates/da/versand_geschenk.xml
==============================================================================
--- branches/bos/projects/bos/payment-website/templates/da/versand_geschenk.xml	(original)
+++ branches/bos/projects/bos/payment-website/templates/da/versand_geschenk.xml	Fri Jan 18 06:14:31 2008
@@ -180,5 +180,6 @@
 			 	</div>			
 			</div>
 		</div>
+		<bos:google-analytics-track />
 	</body>
 </html>

Modified: branches/bos/projects/bos/payment-website/templates/da/versand_info.xml
==============================================================================
--- branches/bos/projects/bos/payment-website/templates/da/versand_info.xml	(original)
+++ branches/bos/projects/bos/payment-website/templates/da/versand_info.xml	Fri Jan 18 06:14:31 2008
@@ -172,5 +172,6 @@
 			 	</div>			
 			</div>
 		</div>
+		<bos:google-analytics-track />
 	</body>
 </html>

Modified: branches/bos/projects/bos/payment-website/templates/de/infosystem.xml
==============================================================================
--- branches/bos/projects/bos/payment-website/templates/de/infosystem.xml	(original)
+++ branches/bos/projects/bos/payment-website/templates/de/infosystem.xml	Fri Jan 18 06:14:31 2008
@@ -18,6 +18,7 @@
 <div id="content_infosystem">
 	<h1 class="extra">Infosystem "rund um das Satellitenbild"</h1>
 </div>
+<bos:google-analytics-track />
 </body>
 </html>
 

Modified: branches/bos/projects/bos/payment-website/templates/de/profil.xml
==============================================================================
--- branches/bos/projects/bos/payment-website/templates/de/profil.xml	(original)
+++ branches/bos/projects/bos/payment-website/templates/de/profil.xml	Fri Jan 18 06:14:31 2008
@@ -124,5 +124,6 @@
     </table>
    </form>
   </bos:save-profile>
+  <bos:google-analytics-track />
  </body>
 </html>

Modified: branches/bos/projects/bos/payment-website/templates/de/quittung.xml
==============================================================================
--- branches/bos/projects/bos/payment-website/templates/de/quittung.xml	(original)
+++ branches/bos/projects/bos/payment-website/templates/de/quittung.xml	Fri Jan 18 06:14:31 2008
@@ -166,5 +166,6 @@
 			 	</div>
 			</div>
 		</div>
+		<bos:google-analytics-track />
 	</body>
 </html>

Modified: branches/bos/projects/bos/payment-website/templates/de/ring-detail.xml
==============================================================================
--- branches/bos/projects/bos/payment-website/templates/de/ring-detail.xml	(original)
+++ branches/bos/projects/bos/payment-website/templates/de/ring-detail.xml	Fri Jan 18 06:14:31 2008
@@ -21,8 +21,9 @@
 		<div style="padding:10px">
 			<img src="/images/pfeil_link_on.gif" width="10" height="9" border="0" alt="" />
 			<a href="javascript:window.close()" class="more">
-				Fenster schließen
+				Fenster schließen
 			</a>
 		</div>
+		<bos:google-analytics-track />
 	</body>
 </html>

Modified: branches/bos/projects/bos/payment-website/templates/de/sponsor_canceled.xml
==============================================================================
--- branches/bos/projects/bos/payment-website/templates/de/sponsor_canceled.xml	(original)
+++ branches/bos/projects/bos/payment-website/templates/de/sponsor_canceled.xml	Fri Jan 18 06:14:31 2008
@@ -105,5 +105,6 @@
 			 	</div>
 			</div>
 		</div>
+		<bos:google-analytics-track />
 	</body>
 </html>

Modified: branches/bos/projects/bos/payment-website/templates/de/toplevel.xml
==============================================================================
--- branches/bos/projects/bos/payment-website/templates/de/toplevel.xml	(original)
+++ branches/bos/projects/bos/payment-website/templates/de/toplevel.xml	Fri Jan 18 06:14:31 2008
@@ -74,5 +74,6 @@
 		<bknr:tag-body />
 	<!-- /content 3teilig-->
 
+		<bos:google-analytics-track />
 	</body>
 </html>

Modified: branches/bos/projects/bos/payment-website/templates/de/toplevel_extra.xml
==============================================================================
--- branches/bos/projects/bos/payment-website/templates/de/toplevel_extra.xml	(original)
+++ branches/bos/projects/bos/payment-website/templates/de/toplevel_extra.xml	Fri Jan 18 06:14:31 2008
@@ -24,8 +24,9 @@
 		<div style="padding:10px">
 			<img src="/images/pfeil_link_on.gif" width="10" height="9" border="0" alt="" />
 			<a href="javascript:window.close()" class="more">
-				Fenster schließen
+				Fenster schließen
 			</a>
 		</div>
+		<bos:google-analytics-track />
 	</body>
 </html>

Modified: branches/bos/projects/bos/payment-website/templates/de/toplevel_main.xml
==============================================================================
--- branches/bos/projects/bos/payment-website/templates/de/toplevel_main.xml	(original)
+++ branches/bos/projects/bos/payment-website/templates/de/toplevel_main.xml	Fri Jan 18 06:14:31 2008
@@ -194,5 +194,6 @@
 				<bknr:tag-body />
 			<!-- /content 3teilig-->
 		</div>
+		<bos:google-analytics-track />
 	</body>
 </html>

Modified: branches/bos/projects/bos/payment-website/templates/de/toplevel_news.xml
==============================================================================
--- branches/bos/projects/bos/payment-website/templates/de/toplevel_news.xml	(original)
+++ branches/bos/projects/bos/payment-website/templates/de/toplevel_news.xml	Fri Jan 18 06:14:31 2008
@@ -192,5 +192,6 @@
 				<bknr:tag-body />
 			<!-- /content 3teilig-->
 		</div>
+		<bos:google-analytics-track />
 	</body>
 </html>

Modified: branches/bos/projects/bos/payment-website/templates/de/versand_geschenk.xml
==============================================================================
--- branches/bos/projects/bos/payment-website/templates/de/versand_geschenk.xml	(original)
+++ branches/bos/projects/bos/payment-website/templates/de/versand_geschenk.xml	Fri Jan 18 06:14:31 2008
@@ -180,5 +180,6 @@
 			 	</div>			
 			</div>
 		</div>
+		<bos:google-analytics-track />
 	</body>
 </html>

Modified: branches/bos/projects/bos/payment-website/templates/de/versand_info.xml
==============================================================================
--- branches/bos/projects/bos/payment-website/templates/de/versand_info.xml	(original)
+++ branches/bos/projects/bos/payment-website/templates/de/versand_info.xml	Fri Jan 18 06:14:31 2008
@@ -183,5 +183,6 @@
 			 	</div>			
 			</div>
 		</div>
+		<bos:google-analytics-track />
 	</body>
 </html>

Modified: branches/bos/projects/bos/payment-website/templates/en/infosystem.xml
==============================================================================
--- branches/bos/projects/bos/payment-website/templates/en/infosystem.xml	(original)
+++ branches/bos/projects/bos/payment-website/templates/en/infosystem.xml	Fri Jan 18 06:14:31 2008
@@ -18,6 +18,7 @@
 <div id="content_infosystem">
 	<h1 class="extra">Infosystem "satellite map"</h1>
 </div>
+<bos:google-analytics-track />
 </body>
 </html>
 

Modified: branches/bos/projects/bos/payment-website/templates/en/profil.xml
==============================================================================
--- branches/bos/projects/bos/payment-website/templates/en/profil.xml	(original)
+++ branches/bos/projects/bos/payment-website/templates/en/profil.xml	Fri Jan 18 06:14:31 2008
@@ -124,5 +124,6 @@
     </table>
    </form>
   </bos:save-profile>
+  <bos:google-analytics-track />
  </body>
 </html>

Modified: branches/bos/projects/bos/payment-website/templates/en/quittung.xml
==============================================================================
--- branches/bos/projects/bos/payment-website/templates/en/quittung.xml	(original)
+++ branches/bos/projects/bos/payment-website/templates/en/quittung.xml	Fri Jan 18 06:14:31 2008
@@ -166,5 +166,6 @@
 			 	</div>
 			</div>
 		</div>
+		<bos:google-analytics-track />
 	</body>
 </html>

Modified: branches/bos/projects/bos/payment-website/templates/en/ring-detail.xml
==============================================================================
--- branches/bos/projects/bos/payment-website/templates/en/ring-detail.xml	(original)
+++ branches/bos/projects/bos/payment-website/templates/en/ring-detail.xml	Fri Jan 18 06:14:31 2008
@@ -24,5 +24,6 @@
 				close window
 			</a>
 		</div>
+		<bos:google-analytics-track />
 	</body>
 </html>

Modified: branches/bos/projects/bos/payment-website/templates/en/sponsor_canceled.xml
==============================================================================
--- branches/bos/projects/bos/payment-website/templates/en/sponsor_canceled.xml	(original)
+++ branches/bos/projects/bos/payment-website/templates/en/sponsor_canceled.xml	Fri Jan 18 06:14:31 2008
@@ -105,5 +105,6 @@
 			 	</div>
 			</div>
 		</div>
+		<bos:google-analytics-track />
 	</body>
 </html>

Modified: branches/bos/projects/bos/payment-website/templates/en/toplevel.xml
==============================================================================
--- branches/bos/projects/bos/payment-website/templates/en/toplevel.xml	(original)
+++ branches/bos/projects/bos/payment-website/templates/en/toplevel.xml	Fri Jan 18 06:14:31 2008
@@ -76,5 +76,6 @@
 		<bknr:tag-body />
 	<!-- /content 3teilig-->
 
+		<bos:google-analytics-track />
 	</body>
 </html>

Modified: branches/bos/projects/bos/payment-website/templates/en/toplevel_extra.xml
==============================================================================
--- branches/bos/projects/bos/payment-website/templates/en/toplevel_extra.xml	(original)
+++ branches/bos/projects/bos/payment-website/templates/en/toplevel_extra.xml	Fri Jan 18 06:14:31 2008
@@ -27,5 +27,6 @@
 				close window
 			</a>
 		</div>
+		<bos:google-analytics-track />
 	</body>
 </html>

Modified: branches/bos/projects/bos/payment-website/templates/en/toplevel_main.xml
==============================================================================
--- branches/bos/projects/bos/payment-website/templates/en/toplevel_main.xml	(original)
+++ branches/bos/projects/bos/payment-website/templates/en/toplevel_main.xml	Fri Jan 18 06:14:31 2008
@@ -192,5 +192,6 @@
 				<bknr:tag-body />
 			<!-- /content 3teilig-->
 		</div>
+		<bos:google-analytics-track />
 	</body>
 </html>

Modified: branches/bos/projects/bos/payment-website/templates/en/versand_geschenk.xml
==============================================================================
--- branches/bos/projects/bos/payment-website/templates/en/versand_geschenk.xml	(original)
+++ branches/bos/projects/bos/payment-website/templates/en/versand_geschenk.xml	Fri Jan 18 06:14:31 2008
@@ -180,5 +180,6 @@
 			 	</div>			
 			</div>
 		</div>
+		<bos:google-analytics-track />
 	</body>
 </html>

Modified: branches/bos/projects/bos/payment-website/templates/en/versand_info.xml
==============================================================================
--- branches/bos/projects/bos/payment-website/templates/en/versand_info.xml	(original)
+++ branches/bos/projects/bos/payment-website/templates/en/versand_info.xml	Fri Jan 18 06:14:31 2008
@@ -181,5 +181,6 @@
 			 	</div>			
 			</div>
 		</div>
+		<bos:google-analytics-track />
 	</body>
 </html>

Modified: branches/bos/projects/bos/web/config.lisp
==============================================================================
--- branches/bos/projects/bos/web/config.lisp	(original)
+++ branches/bos/projects/bos/web/config.lisp	Fri Jan 18 06:14:31 2008
@@ -1,12 +1,15 @@
 (in-package :bos.web)
 
-;; Worldpay (headcraft inst id ist 102532
+;; Worldpay installation ID
 (defparameter *worldpay-installation-id* 103530
   "Installation-ID für Worldpay")
 
 ;; Worldpay Test Mode
 (defparameter *worldpay-test-mode* t)
 
+;; Account fuer Google Analytics
+(defparameter *google-analytics-account* "UA-3432040-2")
+
 ;; URL für BASE HREFs
 (defparameter *website-url* "http://create-rainforest.org")
 

Modified: branches/bos/projects/bos/web/startup.lisp
==============================================================================
--- branches/bos/projects/bos/web/startup.lisp	(original)
+++ branches/bos/projects/bos/web/startup.lisp	Fri Jan 18 06:14:31 2008
@@ -16,13 +16,20 @@
 (defvar *website-url*)
 (defvar *worldpay-test-mode*)
 
-(defun init (&key (port 8080) (listeners 1) (vhosts '("localhost")) website-directory website-url worldpay-test-mode)
+(defun init (&key (port 8080)
+		  (listeners 1)
+		  (vhosts '("localhost")) 
+		  website-directory
+		  website-url
+		  worldpay-test-mode
+		  google-analytics-account)
   (setf *port* port)
   (setf *listeners* listeners)
   (setf *vhosts* vhosts)
   (setf *website-url* website-url)
   (setf *website-directory* website-directory)
   (setf *worldpay-test-mode* worldpay-test-mode)
+  (setf *google-analytics-account* google-analytics-account)
   (unless *website-directory*
     (error ":website-directory not specified"))
   (reinit))

Modified: branches/bos/projects/bos/web/tags.lisp
==============================================================================
--- branches/bos/projects/bos/web/tags.lisp	(original)
+++ branches/bos/projects/bos/web/tags.lisp	Fri Jan 18 06:14:31 2008
@@ -169,4 +169,11 @@
 (define-bknr-tag admin-login-page (&key children)
   (if (editor-p (bknr-request-user (get-template-var :request)))
       (html (:head ((:meta :http-equiv "refresh" :content "0; url=/admin"))))
-      (mapc #'emit-template-node children)))
\ No newline at end of file
+      (mapc #'emit-template-node children)))
+
+(define-bknr-tag google-analytics-track ()
+  (html ((:script :type "text/javascript")
+	 "var gaJsHost = (('https:' == document.location.protocol) ? 'https://ssl.' : 'http://www.');
+document.write(unescape('%3Cscript src=%22' + gaJsHost + 'google-analytics.com/ga.js%22 type=%22text/javascript%22%3E%3C/script%3E'));")
+	((:script :type "text/javascript")
+	 #?"if (_gat) { var pageTracker = _gat._getTracker('$(*google-analytics-account*)'); pageTracker._initData(); pageTracker._trackPageview(); }")))



More information about the Bknr-cvs mailing list