<commit_before>// FoxMetrics
// -----------
// [Documentation](http://foxmetrics.com/documentation)
// [Support](http://support.foxmetrics.com)

analytics.addProvider('FoxMetrics', {

    settings: {
        appId: null,
        appName: null,
        cookieDomain: null
    },


    // Initialize
    // ----------

    initialize: function (settings) {
        settings = analytics.utils.resolveSettings(settings, 'appId');
        analytics.utils.extend(this.settings, settings);

        // fxm - aync script load
        var _fxm = _fxm || {};
        _fxm.events = _fxm.events || [];
        window._fxm = _fxm.events;

        function _fxms(id) {
            (function () {
                var fxms = document.createElement('script'); fxms.type = 'text/javascript'; fxms.async = true;
                fxms.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'd35tca7vmefkrc.cloudfront.net/scripts/' + id + '.js';
                var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(fxms, s);
            })();
        }

        _fxms(this.settings.appId);
    },


    // Identify
    // --------

    identify: function (userId, traits) {

        // FoxMetrics allows the user to create/update a profile
        // however, the user id is a required field
        if (typeof (userId) !== 'undefined' && userId) {

            // fxm needs first and last name seperately
            var fname = null, lname = null, email = null;
            if (traits) {
                fname = traits.name.split(' ')[0];
                lname = traits.name.split(' ')[1];
                email = typeof (traits.email) !== 'undefined' ? traits.email : null;
            }

            // we should probably remove name and email before passing as attributes
            window._fxm.push(['_fxm.visitor.Profile', userId, fname, lname, email, null, null, null, (traits || null)]);
        }
    },
<commit_msg>removed unused values and some minor updates<commit_after>// FoxMetrics
// -----------
// [Website] (http://foxmetrics.com)
// [Documentation](http://foxmetrics.com/documentation)
// [Documentation - JS](http://foxmetrics.com/documentation/apijavascript)
// [Support](http://support.foxmetrics.com)

analytics.addProvider('FoxMetrics', {

    settings: {
        appId: null
    },


    // Initialize
    // ----------

    initialize: function (settings) {
        settings = analytics.utils.resolveSettings(settings, 'appId');
        analytics.utils.extend(this.settings, settings);

        var _fxm = window._fxm || {};
        window._fxm = _fxm.events || [];

        function _fxms(id) {
            (function () {
                var fxms = document.createElement('script'); fxms.type = 'text/javascript'; fxms.async = true;
                fxms.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'd35tca7vmefkrc.cloudfront.net/scripts/' + id + '.js';
                var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(fxms, s);
            })();
        }

        _fxms(this.settings.appId);
    },


    // Identify
    // --------

    identify: function (userId, traits) {

        // user id is required for profile updates,
        // otherwise its a waste of resources as nothing will get updated
        if (userId) {
            // fxm needs first and last name seperately
            var fname = null, lname = null, email = null;
            if (traits) {
                fname = traits.name.split(' ')[0];
                lname = traits.name.split(' ')[1];
                email = typeof (traits.email) !== 'undefined' ? traits.email : null;
            }

            // we should probably remove name and email before passing as attributes
            window._fxm.push(['_fxm.visitor.Profile', userId, fname, lname, email, null, null, null, (traits || null)]);
        }
    },

{'fraction_non_alphanumeric': 0.15713919507818508, 'fraction_numerical': 0.0030761343245321714, 'mean_word_length': 1.9538228614685844, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, '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': '657654', 'n_tokens_mistral': 1147, 'n_tokens_neox': 1104, 'n_words': 261}