<widget config="widgets/GoogleAnalytics/GoogleAnalyticsWidget.xml" url="widgets/GoogleAnalytics/GoogleAnalyticsWidget.swf"/>
I loaded the compiled version in our Flex 2.5 version ... and when i open the viewer the hour glass runs endlessly. Any suggestions? Thanks much.
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" minWidth="955" minHeight="600" addedToStage="onComplete()"> <mx:Script> <![CDATA[ import com.google.analytics.GATracker; import com.google.analytics.AnalyticsTracker; public var tracker:AnalyticsTracker; private function onComplete():void { tracker = new GATracker( this, "UA-111-222", "AS3", false ); tracker.trackPageview( "/Initial"); } protected function b1_clickHandler(event:MouseEvent):void { tracker.trackPageview( "/Widget1_load"); } protected function b2_clickHandler(event:MouseEvent):void { tracker.trackPageview( "/Widget1_table"); } protected function b3_clickHandler(event:MouseEvent):void { tracker.trackPageview( "/Widget2_load"); } ]]> </mx:Script> <mx:Panel id="p1"> <mx:Button id="W1_load" click="b1_clickHandler(event)"/> <mx:Button id="W1_table" click="b2_clickHandler(event)"/> <mx:Button id="W2_load" click="b3_clickHandler(event)"/> </mx:Panel> </mx:Application>
I use it on my site directly from within flex. (not flexviewer though)
<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("UA-xyz-x"); pageTracker._trackPageview(); } catch(err) {} </script>
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.