SOLUTION: Lediglich zwei Anpassungen sind durchzuführen:
1. Kopieren des von Google ausgegebenen JavaScript-Fragments in das standard_html_footer-Template (unmittelbar vor dem body-Element)
2. Erweiterung der Datei-Links um ein zusätzliches javaScript-Event der Art onClick="javascript:urchinTracker ('/download/zms');"

[ZMSGraphic@/e3493/e736/e947/e2837/howto_images2838][getObjProperty]: key=standard_html Traceback (most recent call last): File "/home/zope2/instance/zms3prod/Products/zms/_objattrs.py", line 661, in getObjProperty value = self.nvl(self.evalMetaobjAttr(key),'') File "/home/zope2/instance/zms3prod/Products/zms/_objattrs.py", line 713, in evalMetaobjAttr return self.getMetaobjManager().evalMetaobjAttr(id,attr_id,zmscontext=self,options=kwargs) File "/home/zope2/instance/zms3prod/Products/zms/ZMSMetaobjManager.py", line 610, in evalMetaobjAttr value = call(metaObjAttr['zpt']) File "/home/zope2/instance/zms3prod/Products/zms/ZMSMetaobjManager.py", line 593, in call return fn(zmscontext=zmscontext) File "/home/zope2/lib/python2.6/site-packages/Zope2-2.13.22-py2.6.egg/Shared/DC/Scripts/Bindings.py", line 322, in __call__ return self._bindAndExec(args, kw, None) File "/home/zope2/lib/python2.6/site-packages/Zope2-2.13.22-py2.6.egg/Shared/DC/Scripts/Bindings.py", line 359, in _bindAndExec return self._exec(bound_data, args, kw) File "/home/zope2/lib/python2.6/site-packages/Zope2-2.13.22-py2.6.egg/Products/PageTemplates/ZopePageTemplate.py", line 338, in _exec result = self.pt_render(extra_context=bound_names) File "/home/zope2/lib/python2.6/site-packages/Zope2-2.13.22-py2.6.egg/Products/PageTemplates/ZopePageTemplate.py", line 435, in pt_render result = PageTemplate.pt_render(self, source, extra_context) File "/home/zope2/lib/python2.6/site-packages/Zope2-2.13.22-py2.6.egg/Products/PageTemplates/PageTemplate.py", line 79, in pt_render showtal=showtal) File "/home/zope2/lib/python2.6/site-packages/zope.pagetemplate-4.0.4-py2.6.egg/zope/pagetemplate/pagetemplate.py", line 135, in pt_render strictinsert=0, sourceAnnotations=sourceAnnotations File "/home/zope2/lib/python2.6/site-packages/zope.pagetemplate-4.0.4-py2.6.egg/zope/pagetemplate/pagetemplate.py", line 258, in __call__ interpreter() File "/home/zope2/lib/python2.6/site-packages/zope.tal-4.0.0-py2.6.egg/zope/tal/talinterpreter.py", line 270, in __call__ self.interpret(self.program) File "/home/zope2/lib/python2.6/site-packages/zope.tal-4.0.0-py2.6.egg/zope/tal/talinterpreter.py", line 342, in interpret handlers[opcode](self, args) File "/home/zope2/lib/python2.6/site-packages/zope.tal-4.0.0-py2.6.egg/zope/tal/talinterpreter.py", line 585, in do_setLocal_tal self.engine.setLocal(name, self.engine.evaluateValue(expr)) File "/home/zope2/lib/python2.6/site-packages/zope.tales-4.0.2-py2.6.egg/zope/tales/tales.py", line 695, in evaluate return expression(self) File "/home/zope2/lib/python2.6/site-packages/Zope2-2.13.22-py2.6.egg/Products/PageTemplates/ZRPythonExpr.py", line 48, in __call__ return eval(self._code, vars, {}) File "PythonExpr", line 1, in UnicodeDecodeError: 'utf8' codec can't decode bytes in position 15-20: unsupported Unicode code range
standard_html_footer

Code-Beispiel für das Zähler-script im standard_html_footer-Template

# Beispiel-Code 1: 
# Ausgabe des Dokument-Pfades 
# erweitert um den finalen File-Namen:
...
onClick="javascript:urchinTracker('<dtml-in "breadcrumbs_obj_path()[1:]"
 >/<dtml-var "getTitlealt(REQUEST)"
 ></dtml-in>/<dtml-var "download_file.getFilename()">')"
...
References: [ZMSLinkElement@/e3493/e736/e947/e2837/howto_refs2839][getObjProperty]: key=standard_html Traceback (most recent call last): File "/home/zope2/instance/zms3prod/Products/zms/_objattrs.py", line 661, in getObjProperty value = self.nvl(self.evalMetaobjAttr(key),'') File "/home/zope2/instance/zms3prod/Products/zms/_objattrs.py", line 713, in evalMetaobjAttr return self.getMetaobjManager().evalMetaobjAttr(id,attr_id,zmscontext=self,options=kwargs) File "/home/zope2/instance/zms3prod/Products/zms/ZMSMetaobjManager.py", line 610, in evalMetaobjAttr value = call(metaObjAttr['zpt']) File "/home/zope2/instance/zms3prod/Products/zms/ZMSMetaobjManager.py", line 593, in call return fn(zmscontext=zmscontext) File "/home/zope2/lib/python2.6/site-packages/Zope2-2.13.22-py2.6.egg/Shared/DC/Scripts/Bindings.py", line 322, in __call__ return self._bindAndExec(args, kw, None) File "/home/zope2/lib/python2.6/site-packages/Zope2-2.13.22-py2.6.egg/Shared/DC/Scripts/Bindings.py", line 359, in _bindAndExec return self._exec(bound_data, args, kw) File "/home/zope2/lib/python2.6/site-packages/Zope2-2.13.22-py2.6.egg/Products/PageTemplates/ZopePageTemplate.py", line 338, in _exec result = self.pt_render(extra_context=bound_names) File "/home/zope2/lib/python2.6/site-packages/Zope2-2.13.22-py2.6.egg/Products/PageTemplates/ZopePageTemplate.py", line 435, in pt_render result = PageTemplate.pt_render(self, source, extra_context) File "/home/zope2/lib/python2.6/site-packages/Zope2-2.13.22-py2.6.egg/Products/PageTemplates/PageTemplate.py", line 79, in pt_render showtal=showtal) File "/home/zope2/lib/python2.6/site-packages/zope.pagetemplate-4.0.4-py2.6.egg/zope/pagetemplate/pagetemplate.py", line 135, in pt_render strictinsert=0, sourceAnnotations=sourceAnnotations File "/home/zope2/lib/python2.6/site-packages/zope.pagetemplate-4.0.4-py2.6.egg/zope/pagetemplate/pagetemplate.py", line 258, in __call__ interpreter() File "/home/zope2/lib/python2.6/site-packages/zope.tal-4.0.0-py2.6.egg/zope/tal/talinterpreter.py", line 270, in __call__ self.interpret(self.program) File "/home/zope2/lib/python2.6/site-packages/zope.tal-4.0.0-py2.6.egg/zope/tal/talinterpreter.py", line 342, in interpret handlers[opcode](self, args) File "/home/zope2/lib/python2.6/site-packages/zope.tal-4.0.0-py2.6.egg/zope/tal/talinterpreter.py", line 585, in do_setLocal_tal self.engine.setLocal(name, self.engine.evaluateValue(expr)) File "/home/zope2/lib/python2.6/site-packages/zope.tales-4.0.2-py2.6.egg/zope/tales/tales.py", line 695, in evaluate return expression(self) File "/home/zope2/lib/python2.6/site-packages/Zope2-2.13.22-py2.6.egg/Products/PageTemplates/ZRPythonExpr.py", line 48, in __call__ return eval(self._code, vars, {}) File "PythonExpr", line 1, in UnicodeDecodeError: 'utf8' codec can't decode bytes in position 48-51: invalid data [ZMSLinkElement@/e3493/e736/e947/e2837/howto_refs2840][getObjProperty]: key=standard_html Traceback (most recent call last): File "/home/zope2/instance/zms3prod/Products/zms/_objattrs.py", line 661, in getObjProperty value = self.nvl(self.evalMetaobjAttr(key),'') File "/home/zope2/instance/zms3prod/Products/zms/_objattrs.py", line 713, in evalMetaobjAttr return self.getMetaobjManager().evalMetaobjAttr(id,attr_id,zmscontext=self,options=kwargs) File "/home/zope2/instance/zms3prod/Products/zms/ZMSMetaobjManager.py", line 610, in evalMetaobjAttr value = call(metaObjAttr['zpt']) File "/home/zope2/instance/zms3prod/Products/zms/ZMSMetaobjManager.py", line 593, in call return fn(zmscontext=zmscontext) File "/home/zope2/lib/python2.6/site-packages/Zope2-2.13.22-py2.6.egg/Shared/DC/Scripts/Bindings.py", line 322, in __call__ return self._bindAndExec(args, kw, None) File "/home/zope2/lib/python2.6/site-packages/Zope2-2.13.22-py2.6.egg/Shared/DC/Scripts/Bindings.py", line 359, in _bindAndExec return self._exec(bound_data, args, kw) File "/home/zope2/lib/python2.6/site-packages/Zope2-2.13.22-py2.6.egg/Products/PageTemplates/ZopePageTemplate.py", line 338, in _exec result = self.pt_render(extra_context=bound_names) File "/home/zope2/lib/python2.6/site-packages/Zope2-2.13.22-py2.6.egg/Products/PageTemplates/ZopePageTemplate.py", line 435, in pt_render result = PageTemplate.pt_render(self, source, extra_context) File "/home/zope2/lib/python2.6/site-packages/Zope2-2.13.22-py2.6.egg/Products/PageTemplates/PageTemplate.py", line 79, in pt_render showtal=showtal) File "/home/zope2/lib/python2.6/site-packages/zope.pagetemplate-4.0.4-py2.6.egg/zope/pagetemplate/pagetemplate.py", line 135, in pt_render strictinsert=0, sourceAnnotations=sourceAnnotations File "/home/zope2/lib/python2.6/site-packages/zope.pagetemplate-4.0.4-py2.6.egg/zope/pagetemplate/pagetemplate.py", line 258, in __call__ interpreter() File "/home/zope2/lib/python2.6/site-packages/zope.tal-4.0.0-py2.6.egg/zope/tal/talinterpreter.py", line 270, in __call__ self.interpret(self.program) File "/home/zope2/lib/python2.6/site-packages/zope.tal-4.0.0-py2.6.egg/zope/tal/talinterpreter.py", line 342, in interpret handlers[opcode](self, args) File "/home/zope2/lib/python2.6/site-packages/zope.tal-4.0.0-py2.6.egg/zope/tal/talinterpreter.py", line 585, in do_setLocal_tal self.engine.setLocal(name, self.engine.evaluateValue(expr)) File "/home/zope2/lib/python2.6/site-packages/zope.tales-4.0.2-py2.6.egg/zope/tales/tales.py", line 695, in evaluate return expression(self) File "/home/zope2/lib/python2.6/site-packages/Zope2-2.13.22-py2.6.egg/Products/PageTemplates/ZRPythonExpr.py", line 48, in __call__ return eval(self._code, vars, {}) File "PythonExpr", line 1, in UnicodeDecodeError: 'utf8' codec can't decode bytes in position 33-38: unsupported Unicode code range

Erstellt von: Dr. F. Hoffmann , erstellt am:  27.06.2008 , zuletzt geändert: 19.07.2008

Erstellt von: Dr. F. Hoffmann , erstellt am:  27.06.2008 , zuletzt geändert: 19.07.2008