[Seaside] Setting up MixPanel and Seaside

Lawrence Kellogg mac.hive at me.com
Thu May 10 14:32:47 UTC 2012

  So, I want to use MixPanel (www.mixpanel.com) to monitor user actions in realtime. How do I 
configure this from within Seaside?

  I am told that I have to include this: 

	html script: '<!-- start Mixpanel --><script type="text/javascript">(function(d,c){var a,b,g,e;a=d.createElement("script");a.type="text/javascript";a.async=!0;a.src=("https:"===d.location.protocol?"https:":"http:")+"//api.mixpanel.com/site_media/js/api/mixpanel.2.js";b=d.getElementsByTagName("script")[0];b.parentNode.insertBefore(a,b);c._i=[];c.init=function(a,d,f){var b=c;"undefined"!==typeof f?b=c[f]=[]:f="mixpanel";g="disable track track_pageview track_links track_forms register register_once unregister identify name_tag set_config".split(" ");
mixpanel.init("xxxxxxxxxxxxxxxxxxxxxx");</script><!-- end Mixpanel -->'.


html script: 'mixpanel.track("User Login");'

The first call seems to work ok, but the second call crashes in: 

	"Open the receiving and all associated attributes onto the document."

	self document openTag: self tag attributes: attributes closed: self isClosed

with this walk back, as document seems to be nil: 

MessageNotUnderstood 2010: No method was found for the selector <#'openTag:attributes:closed:'> when sent to <nil> with arguments contained in <anArray( 'script', aWAHtmlAttributes('type'->'text/javascript'), false)>.

Any thoughts as to what I am doing wrong? 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20120510/394d39d4/attachment.htm

More information about the seaside mailing list