[Seaside] Setting up MixPanel and Seaside

Lawrence Kellogg mac.hive at me.com
Sat May 12 15:49:29 UTC 2012

Any ideas? Perhaps, I just don't understand the Seaside Javascript interface. 


On May 10, 2012, at 10:32 AM, Lawrence Kellogg wrote:

> Hello, 
>   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(" ");
> for(e=0;e<g.length;e++)(function(a){b[a]=function(){b.push([a].concat(Array.prototype.slice.call(arguments,0)))}})(g[e]);c._i.push([a,d,f])};window.mixpanel=c})(document,[]);
> mixpanel.init("xxxxxxxxxxxxxxxxxxxxxx");</script><!-- end Mixpanel -->'.
> and 
> html script: 'mixpanel.track("User Login");'
> The first call seems to work ok, but the second call crashes in: 
> openTag
> 	"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? 
> Larry
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20120512/933cde53/attachment.htm

More information about the seaside mailing list