<commit_before>'use strict';

/**
 * Module dependencies.
 */

var integration = require('@segment/analytics.js-integration');

/**
 * Expose `Acquisio` integration.
 */

var Acquisio = module.exports = integration('Acquisio')
.global('TTDUniversalPixelApi')
.option('events', '')
.option('advertiserId', '')

/**
 * Initialize.
 *
 * Documentation:
 *
 * @api public
 */

Acquisio.prototype.initialize = function() {
    var div = document.body.appendChild(document.createElement('div'));
    div.style.display = 'none';
    div.setAttribute('id', 'ttdUniversalPixelTagb36891b1ae0c43c58ed7c4959ea61e43');

    var scriptElement = document.createElement('script');
    scriptElement.setAttribute("type","text/javascript");
    var advertiserId = this.options.advertiserId;
    div.appendChild(scriptElement);
    scriptElement.onload = function () {
        if (typeof TTDUniversalPixelApi === "function") {
            var universalPixelApi = new TTDUniversalPixelApi();
            universalPixelApi.init(advertiserId, ["nwzwuyj"], "https://insight.adsrvr.org/track/up", "ttdUniversalPixelTagb36891b1ae0c43c58ed7c4959ea61e43");
        }
    };
    scriptElement.src = 'https://js.adsrvr.org/up_loader.1.1.0.js';

    this.ready();
};

/**
 * Loaded?
 *
 * @api private
 * @return {boolean}
 */

Acquisio.prototype.loaded = function() {
    return true;
};

/**
 * Track.
 *
 * @api public
 * @param {Track} track
 */

Acquisio.prototype.track = function(track) {<commit_msg>wrapped some initialize functionality in window.onload<commit_after>'use strict';

/**
 * Module dependencies.
 */

var integration = require('@segment/analytics.js-integration');

/**
 * Expose `Acquisio` integration.
 */

var Acquisio = module.exports = integration('Acquisio')
.global('TTDUniversalPixelApi')
.option('events', '')
.option('advertiserId', '')

/**
 * Initialize.
 *
 * Documentation:
 *
 * @api public
 */

Acquisio.prototype.initialize = function() {
    window.onload = function () {
        var div = document.body.appendChild(document.createElement('div'));
        div.style.display = 'none';
        div.setAttribute('id', 'ttdUniversalPixelTagb36891b1ae0c43c58ed7c4959ea61e43');

        var scriptElement = document.createElement('script');
        scriptElement.setAttribute("type","text/javascript");
        var advertiserId = this.options.advertiserId;
        div.appendChild(scriptElement);
        scriptElement.onload = function () {
            if (typeof TTDUniversalPixelApi === "function") {
                var universalPixelApi = new TTDUniversalPixelApi();
                universalPixelApi.init(advertiserId, ["nwzwuyj"], "https://insight.adsrvr.org/track/up", "ttdUniversalPixelTagb36891b1ae0c43c58ed7c4959ea61e43");
            }
        };
        scriptElement.src = 'https://js.adsrvr.org/up_loader.1.1.0.js';

        this.ready();
    };
};

/**
 * Track.
 *
 * @api public
 * @param {Track} track
 */

Acquisio.prototype.track = function(track) {
{'fraction_non_alphanumeric': 0.15366509751176866, 'fraction_numerical': 0.028917283120376596, 'mean_word_length': 3.583975346687211, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '1618644', 'n_tokens_mistral': 987, 'n_tokens_neox': 934, 'n_words': 142}