Jump to:

10842 Posts in 2513 Topics by 1792 members

All other Modules

SilverStripe Forums » All other Modules » Google Analytics Module Roadmap

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1147 Views
  • candidasa
    Avatar
    Community Member
    10 Posts

    Google Analytics Module Roadmap Link to this post

    Hi there,
    I'm the new maintainer for the Google Analytics module. I'm a developer at SilverStripe.

    The module is now hosted on GitHub at SilverStripe-Labs:
    https://github.com/silverstripe-labs/silverstripe-googleanalytics

    I've updated the readme file with a tentative roadmap. These are ideas I had for how to improve this module. I'd like to hear your feedback on which improvements are most important to you. Please be specific and state why you want a certain feature.

    Also, if you are willing to help improve the module that would be great. Pick any of the improvements, implement it and submit your work using a "pull request" on github (please create a unit test for any new feature you submit).

    If you have any other ideas for thing you'd like to see in the Google Analytics module please post them here for us to discuss. If enough people agree that a certain feature is worth having, I'll add it to the roadmap and we can get it implement.

    All the best,
    Julian

  • Wade
    Avatar
    Community Member
    6 Posts

    Re: Google Analytics Module Roadmap Link to this post

    hi,
    I just wanted to let you know that i have debugged the current trunk release to allow it to function for internet explorer. If you tell me how to send you my code, i will forward it all to you.
    Thanks
    Wade

  • candidasa
    Avatar
    Community Member
    10 Posts

    Re: Google Analytics Module Roadmap Link to this post

    Hi Wade,
    It would be great to get your fix, yes. Please either use the git "pull request" system to sent it or just send it to me directly.

    Thanks for your help with improving this module,
    Julian

  • vancouverWill
    Avatar
    Community Member
    121 Posts

    Re: Google Analytics Module Roadmap Link to this post

    Hi

    I just downloaded the latest version and huge increase of performance over the last version I had from 18 months ago which basically allowed the user to login to google analytics from what appeard to be an iframe within SS admin. So congratulations on the work.

    The admin setup is now done from siteconfig which makes sense except for the password field which is just a text field. I changed mine to a password field which SS makes really simple but it would be nice not to have to do that everytime I install the module. I can't see many advantages of giving open view to the password as it makes it a hassle when ever more than 1 person is using the back end of the site. Just a thought, maybe there is some reason I'm not noticing?

    Thanks

    Will

  • candidasa
    Avatar
    Community Member
    10 Posts

    Re: Google Analytics Module Roadmap Link to this post

    Hi Will,
    You can still set the password in the _config.php file, if you don't want to use the siteconfig. But you a right, it is a good idea to use a passwordfield in the siteconfig. If you could send me a patch I will integrate it into the module code.

    Best regards,
    Julian

  • vancouverWill
    Avatar
    Community Member
    121 Posts

    Re: Google Analytics Module Roadmap Link to this post

    Thanks for the quick reply Julian. All I did was change GoogleConfig.php to, notice
    **********************************
    fields->addFieldToTab('Root.GoogleAnalytics', new PasswordField('GoogleAnalyticsPassword', 'Google Analytics Password (the password for the above account)'));
    **********************************

    this stops the user from seeing the password but doesn't encrypt it in the database

    class GoogleConfig extends DataObjectDecorator {

       function extraStatics() {
          return array(
             'db' => array(
                'GoogleAnalyticsCode' => 'Varchar',
                'GoogleAnalyticsProfileId' => 'Varchar',
                'GoogleAnalyticsEmail' => 'Varchar',
                'GoogleAnalyticsPassword' => 'Varchar',
             ),
          );
       }

       public function updateCMSFields(FieldSet $fields) {

          $fields->addFieldToTab("Root", new Tab('GoogleAnalytics'));
          $fields->addFieldToTab('Root.GoogleAnalytics', new TextField('GoogleAnalyticsCode', 'Google Analytics Code (UA-XXXXXX-X)'));
          $fields->addFieldToTab('Root.GoogleAnalytics', new TextField('GoogleAnalyticsProfileId', 'Google Analytics Profile ID (hidden in the URL parameter "id" of the "View Report" link inside Google Analytics)'));
          $fields->addFieldToTab('Root.GoogleAnalytics', new TextField('GoogleAnalyticsEmail', 'GoogleAnalyticsEmail (the email address of the Google Analytics account to use)'));
          $fields->addFieldToTab('Root.GoogleAnalytics', new PasswordField('GoogleAnalyticsPassword', 'Google Analytics Password (the password for the above account)'));
       }
    z
       /**
        *   Return various configuration values
        *   
        *   @param $key String:
        *      'profile' the Google Analytics profile id or
        *      'email' the Google Analytics account's email address or
        *      'password' the password for the above Google Analytics account
        *   @return String the config value
        **/
       public static function get_google_config($key) {
          if(class_exists('SiteConfig') && Object::has_extension('SiteConfig', 'GoogleConfig')) {
             $config = SiteConfig::current_site_config();
          }
          switch($key) {
             case 'code':       return !empty($config) && $config->GoogleAnalyticsCode       ? $config->GoogleAnalyticsCode       : GoogleLogger::$google_analytics_code;
             case 'profile':    return !empty($config) && $config->GoogleAnalyticsProfileId   ? $config->GoogleAnalyticsProfileId   : GoogleAnalyzer::$profile_id;
             case 'email':       return !empty($config) && $config->GoogleAnalyticsEmail    ? $config->GoogleAnalyticsEmail    : GoogleAnalyzer::$email;
             case 'password':    return !empty($config) && $config->GoogleAnalyticsPassword    ? $config->GoogleAnalyticsPassword    : GoogleAnalyzer::$password;
          }
       }
       
    }

  • candidasa
    Avatar
    Community Member
    10 Posts

    Re: Google Analytics Module Roadmap Link to this post

    Thanks for the suggestion and code Will. I've updated the module.

    Julian

  • Wade
    Avatar
    Community Member
    6 Posts

    Re: Google Analytics Module Roadmap Link to this post

    I am sorry for posting in the wrong area, but I know that this particular thread is getting some action. I am trying to fix the whole "$can_be_root" problem, and i can't figure out how to check if the user in the admin area has the root currently selected. I have created a check for the variable as it runs through all the classes but my check removes the class from all the lists. Anyone have an example of how to check this?

    Thanks
    Wade

    1147 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.