Select to view content in your preferred language

Google Analytics for Flex 2.5

2697
11
Jump to solution
01-31-2012 11:41 PM
JustinGleeson
Deactivated User
Hi All,
Just wondering if the Google Analytics widget available here http://www.arcgis.com/home/item.html?id=151491cec5be41b5bb5c81dfe63b1669 works for Flex 2.5? It seems to have been developed for 2.2.

thanks

Justin
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
TimDine
Frequent Contributor
I'm using the uncompiled widget with 3.3 viewer and it doesn't appear to have any major issues.  I get a few warnings about deprecated functions, but it logs some data to google analytics that I can view.  I'll keep trying it out.  Looks positive.

View solution in original post

0 Kudos
11 Replies
MLowry
by
Frequent Contributor
I'd also like to use it for 2.5, but I think 3.0 is being released soonish so maybe they should wait or use the 3.0 beta to develop the new version.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
3.0 API and Viewer will not come out until (or after) ArcGIS Server 10.1 is available.
0 Kudos
deleted-user-dbQhBq-o3nyM
Deactivated User
Any chance there will be a Google Analytics for Flex version 3.1?
0 Kudos
TimDine
Frequent Contributor
I'm using the uncompiled widget with 3.3 viewer and it doesn't appear to have any major issues.  I get a few warnings about deprecated functions, but it logs some data to google analytics that I can view.  I'll keep trying it out.  Looks positive.
0 Kudos
KeisukeNozaki
Frequent Contributor
Is there anyone who could compile this widget for 3.3?
0 Kudos
AlanIoriati_Colombelli
New Contributor
I'm using the uncompiled widget with 3.3 viewer and it doesn't appear to have any major issues.  I get a few warnings about deprecated functions, but it logs some data to google analytics that I can view.  I'll keep trying it out.  Looks positive.



Hi, I tried compiling for version 3.5 and the following error appears:

  Encountered errors or warnings while building project GoogleAnalyticsWidget.mxml.
    GoogleAnalyticsWidget.mxml: Access of possibly undefined property AppEvent through a reference with static type Class.
    GoogleAnalyticsWidget.mxml: Access of possibly undefined property AppEvent through a reference with static type Class.
    GoogleAnalyticsWidget.mxml: Access of possibly undefined property AppEvent through a reference with static type Class.
    GoogleAnalyticsWidget.mxml: Access of possibly undefined property AppEvent through a reference with static type mx.managers:ISystemManager.


Anyone have idea to solve the problem?

Thanks!
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Alan,

   Here are the 3 updated lines of code:

            private function init():void
            {
                //Get the initial parameters from the config file
                if (configXML)
                {
                    gaAccount = configXML.account;
                    logWidgets = configXML.logwidgets == "true";
                    logBasemaps = configXML.logbasemaps == "true";
                    logDrawtools = configXML.logdrawtools == "true";
                }
                
                //only set listeners if there is an account in the config file
                if (gaAccount != "")
                {
                    tracker = new GATracker( this, gaAccount, "AS3", false );
                    
                    //Log a visit marked as Home page as this will occur when viewer is first opened.
                    tracker.trackPageview( "/" + configXML.flexviewer);
                    AppEvent.addListener(AppEvent.WIDGET_RUN, listenHandler);
                    AppEvent.addListener(AppEvent.BASEMAP_SWITCH, listenHandler);
                    AppEvent.addListener(AppEvent.SET_MAP_ACTION, listenHandler);
                    systemManager.addEventListener(GoogleAnalyticsWidgetEvent.LOG_PAGE, logPageHandler);
                }
                
            }
0 Kudos
AlanIoriati_Colombelli
New Contributor
Hi Robert,


Thanks for the help, the widget was compiled perfectly with the 3 updated lines of code.



Att,
0 Kudos
KeisukeNozaki
Frequent Contributor
Would you mind sharing the compiled widget?


Hi Robert,


Thanks for the help, the widget was compiled perfectly with the 3 updated lines of code.



Att,
0 Kudos