<commit_before>/*********************************
 * Adobe Analytics Helper - Data Insertion API helper
 * @author <NAME>
 *
 */
"use strict";
/***********
 * https://marketing.adobe.com/developer/en_US/documentation/data-insertion/c-data-insertion-process
 * https://marketing.adobe.com/developer/en_US/documentation/data-insertion/r-supported-tags
 * https://marketing.adobe.com/developer/en_US/documentation/data-insertion/r-sample-http-post
 ***********/
var http = require('http');
var _ = require('underscore');
var _adobeAnalyticsHttpAgent = new http.Agent();
_adobeAnalyticsHttpAgent.maxSockets = 20; //default connection pool - nodes default is 5
var _eVars = [];
var _persistEvars = true;
var _sProps = [];
var _persistSProps = false;
var _reportingSuiteId=null;
var _persistReportingSuiteId=true;
var _pageName=null;
var _persistPageName=true;
var _defaultIpAddress = process.env.OPENSHIFT_NODEJS_IP;
var _xmlPre = "<?xml version=1.0 encoding=UTF-8?><request><sc_xml_ver>1.0</sc_xml_ver>";
var _xmlPost = "</request>";
//parameter map - keyName : object (name, description,multiform (goofy term for more than one))
var _parameters = {
    browserHeight:{postParam:"browserHeight",description:"Browser height in pixels (For example, 768).",multiform:false,getParam:"bh"},
    browserWidth:{postParam:"browserWidth",description:"Browser width in pixels (For example, 1024).",multiform:false,getParam:"bw"},
    campaign:{postParam:"campaign",description:"The campaign tracking code associated with the page.",multiform:false,getParam:"v0"},
    channel:{postParam:"channel",description:"The page title or bread crumb.",multiform:false,getParam:"ch"},
    colorDepth:{postParam:"colorDepth",description:"Monitor color depth in bits (For example, 24).",multiform:false,getParam:"c"},
    connectionType:{postParam:"connectionType",description:'Visitors connection type ("lan" or "modem").',multiform:false,getParam:"ct"},
    contextData:{postParam:"contextData",description:'Key-values pairs are specified in one of the following formats:<my.a>red</my.a> or: <my><a>red</a></my>',multiform:false,getParam:"c.key"},
    cookiesEnabled:{postParam:"cookiesEnabled",description:'Whether the visitor supports first party session cookies (Y or N).',multiform:false,getParam:"k"},
    currencyCode:{postParam:"currencyCode",description:'Revenue currency code For example, USD.',multiform:false},
    eVar:{postParam:"eVar",description:'eVar',multiform:true,max:75},
    events:{postParam:"events",description:'A list of Analytics events. Multiple events are separated by a comma.event1 or event1,event2',multiform:false,getParam:"events"},
    hier:{postParam:"hier",description:'A hierarchy string.',multiform:true,max:5,getParam:"h"},
    homePage:{postParam:"homePage",description:'Whether the current page is the visitors homepage (Y or N).',multiform:false,getParam:"hp"},
    ipaddress:{postParam:"ipaddress",description:'The visitors IP address.',multiform:false,getParam:""},
    javaEnabled:{postParam:"javaEnabled",description:'Whether the visitor has Java enabled (Y or N).',multiform:false,getParam:"v"},
    javaScriptVersion:{postParam:"javaScriptVersion",description:'JavaScript version. For example, 1.3.',multiform:false,getParam:"j"},
    language:{postParam:"language",description:'The browsers supported language. For example, "en-us".',multiform:false,getParam:""},
    linkName:{postParam:"linkName",description:'Name of link.',multiform:false,getParam:"pev2"},
    linkType:{postParam:"linkType",description:'Type of link ("d", "e", or "o").',multiform:false,getParam:"pe"},
    linkURL:{postParam:"linkURL",description:'The links HREF. For custom links, page values are ignored.',multiform:false,getParam:"pev1"},
    list:{postParam:"list",description:'A delimited list of values that are passed into a variable, then reported as individual line items for reporting.',multiform:true,max:3,getParam:"l"},
    pageName:{postParam:"pageName",description:'The Web page name.',multiform:false,getParam:"pageName"},
    pageType:{postParam:"pageType",description:'The Web page type. This is only used on 404 error pages. Set pageType to "Error Page" for when a 404 error is detected.',multiform:false,getParam:"pageType"},
    pageURL:{postParam:"pageURL",description:'The Web page URL For example, http://www.mysite.com/index.html.',multiform:false,getParam:"g"},
    plugins:{postParam:"plugins",description:'Semicolon separated list of Netscape plug-in names.',multiform:false,getParam:"p"},
    products:{postParam:"products",description:'List of all products on the page. Separate products with a comma. For example: Sports;Ball;1;5.95, Toys; Top;1:1.99.',multiform:false,getParam:"products"},
    prop:{postParam:"prop",description:'Analytics property name.',multiform:true,getParam:"c",max:75},<commit_msg>Adding imsregion property for AAM SSF support as per latest Insertion API spec<commit_after>/*********************************
 * Adobe Analytics Helper - Data Insertion API helper
 * @author <NAME>
 *
 */
"use strict";
/***********
 * https://marketing.adobe.com/developer/en_US/documentation/data-insertion/c-data-insertion-process
 * https://marketing.adobe.com/developer/en_US/documentation/data-insertion/r-supported-tags
 * https://marketing.adobe.com/developer/en_US/documentation/data-insertion/r-sample-http-post
 ***********/
var http = require('http');
var _ = require('underscore');
var _adobeAnalyticsHttpAgent = new http.Agent();
_adobeAnalyticsHttpAgent.maxSockets = 20; //default connection pool - nodes default is 5
var _eVars = [];
var _persistEvars = true;
var _sProps = [];
var _persistSProps = false;
var _reportingSuiteId=null;
var _persistReportingSuiteId=true;
var _pageName=null;
var _persistPageName=true;
var _defaultIpAddress = process.env.OPENSHIFT_NODEJS_IP;
var _xmlPre = "<?xml version=1.0 encoding=UTF-8?><request><sc_xml_ver>1.0</sc_xml_ver>";
var _xmlPost = "</request>";
//parameter map - keyName : object (name, description,multiform (goofy term for more than one))
var _parameters = {
    browserHeight:{postParam:"browserHeight",description:"Browser height in pixels (For example, 768).",multiform:false,getParam:"bh"},
    browserWidth:{postParam:"browserWidth",description:"Browser width in pixels (For example, 1024).",multiform:false,getParam:"bw"},
    campaign:{postParam:"campaign",description:"The campaign tracking code associated with the page.",multiform:false,getParam:"v0"},
    channel:{postParam:"channel",description:"The page title or bread crumb.",multiform:false,getParam:"ch"},
    colorDepth:{postParam:"colorDepth",description:"Monitor color depth in bits (For example, 24).",multiform:false,getParam:"c"},
    connectionType:{postParam:"connectionType",description:'Visitors connection type ("lan" or "modem").',multiform:false,getParam:"ct"},
    contextData:{postParam:"contextData",description:'Key-values pairs are specified in one of the following formats:<my.a>red</my.a> or: <my><a>red</a></my>',multiform:false,getParam:"c.key"},
    cookiesEnabled:{postParam:"cookiesEnabled",description:'Whether the visitor supports first party session cookies (Y or N).',multiform:false,getParam:"k"},
    currencyCode:{postParam:"currencyCode",description:'Revenue currency code For example, USD.',multiform:false},
    eVar:{postParam:"eVar",description:'eVar',multiform:true,max:75},
    events:{postParam:"events",description:'A list of Analytics events. Multiple events are separated by a comma.event1 or event1,event2',multiform:false,getParam:"events"},
    hier:{postParam:"hier",description:'A hierarchy string.',multiform:true,max:5,getParam:"h"},
    homePage:{postParam:"homePage",description:'Whether the current page is the visitors homepage (Y or N).',multiform:false,getParam:"hp"},
    ipaddress:{postParam:"ipaddress",description:'The visitors IP address.',multiform:false,getParam:""},
    imsregion:{postParam:"imsregion",description:'The Location Hint from Visitor ID Service.',multiform:false,getParam:""},
    javaEnabled:{postParam:"javaEnabled",description:'Whether the visitor has Java enabled (Y or N).',multiform:false,getParam:"v"},
    javaScriptVersion:{postParam:"javaScriptVersion",description:'JavaScript version. For example, 1.3.',multiform:false,getParam:"j"},
    language:{postParam:"language",description:'The browsers supported language. For example, "en-us".',multiform:false,getParam:""},
    linkName:{postParam:"linkName",description:'Name of link.',multiform:false,getParam:"pev2"},
    linkType:{postParam:"linkType",description:'Type of link ("d", "e", or "o").',multiform:false,getParam:"pe"},
    linkURL:{postParam:"linkURL",description:'The links HREF. For custom links, page values are ignored.',multiform:false,getParam:"pev1"},
    list:{postParam:"list",description:'A delimited list of values that are passed into a variable, then reported as individual line items for reporting.',multiform:true,max:3,getParam:"l"},
    pageName:{postParam:"pageName",description:'The Web page name.',multiform:false,getParam:"pageName"},
    pageType:{postParam:"pageType",description:'The Web page type. This is only used on 404 error pages. Set pageType to "Error Page" for when a 404 error is detected.',multiform:false,getParam:"pageType"},
    pageURL:{postParam:"pageURL",description:'The Web page URL For example, http://www.mysite.com/index.html.',multiform:false,getParam:"g"},
    plugins:{postParam:"plugins",description:'Semicolon separated list of Netscape plug-in names.',multiform:false,getParam:"p"},
    products:{postParam:"products",description:'List of all products on the page. Separate products with a comma. For example: Sports;Ball;1;5.95, Toys; Top;1:1.99.',multiform:false,getParam:"products"},
    prop:{postParam:"prop",description:'Analytics property name.',multiform:true,getParam:"c",max:75},
{'fraction_non_alphanumeric': 0.15971588026382547, 'fraction_numerical': 0.0091324200913242, 'mean_word_length': 7.683700440528634, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 2, '>': 27, 'https://': 6, 'lorem ipsum': 0, 'www.': 2, 'xml': 10}, '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': '386553', 'n_tokens_mistral': 2885, 'n_tokens_neox': 2785, 'n_words': 622}