<commit_before>/* Copyright 2013-2014 Extended Mind Technologies Oy
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
 'use strict';

function AnalyticsService($q, $rootScope, $timeout, BackendClientService, HttpClientService,
                          UserSessionService, packaging, version) {

  var deferredLocation = $q.defer();
  var collectAnalytics = packaging !== 'devel';

  // Skip all analytics, if it is not in use
  if (collectAnalytics){

    // START SESSION.JS

    /**
     * session.js 0.4.1
     * (c) 2012 Iain, CodeJoust
     * session.js is freely distributable under the MIT license.
     * Portions of session.js are inspired or borrowed from Underscore.js, and quirksmode.org demo javascript.
     * This version uses google's jsapi library for location services.
     * For details, see: https://github.com/codejoust/session.js
     */
    var session_fetch = (function(win, doc, nav){
      // Changing the API Version invalidates olde cookies with previous api version tags.
      var API_VERSION = 0.4;
      // Settings: defaults
      var options = {
        // Use the HTML5 Geolocation API
        // this ONLY returns lat & long, no city/address
        use_html5_location: false,
        // Attempts to use IPInfoDB if provided a valid key
        // Get a key at http://ipinfodb.com/register.php
        ipinfodb_key: false,
        // Leaving true allows for fallback for both
        // the HTML5 location and the IPInfoDB
        gapi_location: true,
        // Name of the location cookie (set blank to disable cookie)
        //   - WARNING: different providers use the same cookie
        //   - if switching providers, remember to use another cookie or provide checks for old cookies
        location_cookie: undefined,
        // Location cookie expiration in hours
        location_cookie_timeout: 5,
        // Session expiration in days
        session_timeout: 32,
        // Session cookie name (set blank to disable cookie)
        session_cookie: undefined,
        get_object: null, set_object: null // used for cookie session adaptors
        // if null, will be reset to use cookies by default.
      };

      // Session object
      var SessionRunner = function(){<commit_msg>Remove call to Google location API during analytics, not using geolocation in analytics at all<commit_after>/* Copyright 2013-2014 Extended Mind Technologies Oy
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
 'use strict';

function AnalyticsService($q, $rootScope, $timeout, BackendClientService, HttpClientService,
                          UserSessionService, packaging, version) {

  var deferredLocation = $q.defer();
  var collectAnalytics = packaging !== 'devel';

  // Skip all analytics, if it is not in use
  if (collectAnalytics){

    // START SESSION.JS

    /**
     * session.js 0.4.1
     * (c) 2012 Iain, CodeJoust
     * session.js is freely distributable under the MIT license.
     * Portions of session.js are inspired or borrowed from Underscore.js, and quirksmode.org demo javascript.
     * This version uses google's jsapi library for location services.
     * For details, see: https://github.com/codejoust/session.js
     */
    var session_fetch = (function(win, doc, nav){
      // Changing the API Version invalidates olde cookies with previous api version tags.
      var API_VERSION = 0.4;
      // Settings: defaults
      var options = {
        // Use the HTML5 Geolocation API
        // this ONLY returns lat & long, no city/address
        use_html5_location: false,
        // Attempts to use IPInfoDB if provided a valid key
        // Get a key at http://ipinfodb.com/register.php
        ipinfodb_key: false,
        // Leaving true allows for fallback for both
        // the HTML5 location and the IPInfoDB
        gapi_location: false,
        // Name of the location cookie (set blank to disable cookie)
        //   - WARNING: different providers use the same cookie
        //   - if switching providers, remember to use another cookie or provide checks for old cookies
        location_cookie: undefined,
        // Location cookie expiration in hours
        location_cookie_timeout: 5,
        // Session expiration in days
        session_timeout: 32,
        // Session cookie name (set blank to disable cookie)
        session_cookie: undefined,
        get_object: null, set_object: null // used for cookie session adaptors
        // if null, will be reset to use cookies by default.
      };

      // Session object
      var SessionRunner = function(){
{'fraction_non_alphanumeric': 0.07450628366247755, 'fraction_numerical': 0.00969479353680431, 'mean_word_length': 2.629315960912052, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '1889937', 'n_tokens_mistral': 1468, 'n_tokens_neox': 1387, 'n_words': 623}