<commit_before>'use strict';


// Declare app level module which depends on filters, and services
angular.module('hyphe', [
  'ngRoute'
  ,'ui.bootstrap'
  // ,'angulartics'
  // ,'angulartics.google.analytics'
  ,'hyphe.conf'
  ,'hyphe.filters'
  ,'hyphe.services'
  ,'hyphe.service_utils'
  ,'hyphe.service_hyphe_api'
  ,'hyphe.service_glossary'
  ,'hyphe.directives'
  ,'hyphe.controllers'
])

// Route
.config(['$routeProvider', function($routeProvider) {
  $routeProvider.when('/login', {templateUrl: 'views/login.html', controller: 'Login'});
  $routeProvider.when('/login2', {templateUrl: 'views/login2.html', controller: 'Login2'});
  $routeProvider.when('/overview', {templateUrl: 'views/overview.html', controller: 'Overview'});
  $routeProvider.when('/importurls', {templateUrl: 'views/importurls.html', controller: 'ImportUrls'});
  $routeProvider.when('/definewebentities', {templateUrl: 'views/definewebentities.html', controller: 'DefineWebEntities'});
  $routeProvider.when('/newCrawl', {templateUrl: 'views/newCrawl.html', controller: 'NewCrawl'});
  $routeProvider.when('/checkStartPages', {templateUrl: 'views/checkStartPages.html', controller: 'CheckStartPages'});
  $routeProvider.when('/scheduleCrawls', {templateUrl: 'views/scheduleCrawls.html', controller: 'scheduleCrawls'});
  $routeProvider.when('/monitorCrawls', {templateUrl: 'views/monitorCrawls.html', controller: 'monitorCrawls'});
  $routeProvider.when('/listWebentities', {templateUrl: 'views/listWebentities.html', controller: 'listWebentities'});
  $routeProvider.when('/export', {templateUrl: 'views/export.html', controller: 'export'});
  $routeProvider.when('/settings', {templateUrl: 'views/settings.html', controller: 'settings'});
  $routeProvider.when('/network', {templateUrl: 'views/network.html', controller: 'network'});
  $routeProvider.when('/prospect', {templateUrl: 'views/prospect.html', controller: 'prospect'});
  $routeProvider.otherwise({redirectTo: '/login'});
}])

/*// Analytics
.config(['$analyticsProvider', function ($analyticsProvider) {
  $analyticsProvider.virtualPageviews(true);
  console.log('Analytics provider', $analyticsProvider)
}]);*/

angular.module('hyphe.analytics', [])
.run(['googleAnalyticsId', function(googleAnalyticsId) {

  if(googleAnalyticsId) {
    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
    (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
    m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
    })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
    ga('create', googleAnalyticsId, 'auto');
    ga('send', 'pageview');
  }
}])

/*.run(['$analytics', function($analytics) {
  window.a = $analytics
  $analytics.pageTrack('/test/url');
  console.log('Analytics', $analytics)
}])*/
  <commit_msg>analytics fixed<commit_after>'use strict';


// Declare app level module which depends on filters, and services
angular.module('hyphe', [
  'ngRoute'
  ,'ui.bootstrap'
  ,'angulartics'
  ,'angulartics.google.analytics'
  ,'hyphe.analytics'
  ,'hyphe.conf'
  ,'hyphe.filters'
  ,'hyphe.services'
  ,'hyphe.service_utils'
  ,'hyphe.service_hyphe_api'
  ,'hyphe.service_glossary'
  ,'hyphe.directives'
  ,'hyphe.controllers'
])

// Route
.config(['$routeProvider', function($routeProvider) {
  $routeProvider.when('/login', {templateUrl: 'views/login.html', controller: 'Login'});
  $routeProvider.when('/login2', {templateUrl: 'views/login2.html', controller: 'Login2'});
  $routeProvider.when('/overview', {templateUrl: 'views/overview.html', controller: 'Overview'});
  $routeProvider.when('/importurls', {templateUrl: 'views/importurls.html', controller: 'ImportUrls'});
  $routeProvider.when('/definewebentities', {templateUrl: 'views/definewebentities.html', controller: 'DefineWebEntities'});
  $routeProvider.when('/newCrawl', {templateUrl: 'views/newCrawl.html', controller: 'NewCrawl'});
  $routeProvider.when('/checkStartPages', {templateUrl: 'views/checkStartPages.html', controller: 'CheckStartPages'});
  $routeProvider.when('/scheduleCrawls', {templateUrl: 'views/scheduleCrawls.html', controller: 'scheduleCrawls'});
  $routeProvider.when('/monitorCrawls', {templateUrl: 'views/monitorCrawls.html', controller: 'monitorCrawls'});
  $routeProvider.when('/listWebentities', {templateUrl: 'views/listWebentities.html', controller: 'listWebentities'});
  $routeProvider.when('/export', {templateUrl: 'views/export.html', controller: 'export'});
  $routeProvider.when('/settings', {templateUrl: 'views/settings.html', controller: 'settings'});
  $routeProvider.when('/network', {templateUrl: 'views/network.html', controller: 'network'});
  $routeProvider.when('/prospect', {templateUrl: 'views/prospect.html', controller: 'prospect'});
  $routeProvider.otherwise({redirectTo: '/login'});
}])

// Analytics
.config(['$analyticsProvider', function ($analyticsProvider) {
  $analyticsProvider.virtualPageviews(true);
}])

angular.module('hyphe.analytics', [])
.run(['googleAnalyticsId', function(googleAnalyticsId) {

  if(googleAnalyticsId) {
    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
    (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
    m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
    })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
    ga('create', googleAnalyticsId, 'auto');
  }

}])

  
{'fraction_non_alphanumeric': 0.20185657080451402, 'fraction_numerical': 0.002184200946487077, 'mean_word_length': 6.9753265602322205, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2240007', 'n_tokens_mistral': 1884, 'n_tokens_neox': 1832, 'n_words': 248}