Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test #326

Open
wants to merge 36 commits into
base: master
Choose a base branch
from
Open

test #326

Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
testing log
shellyjaglanMeesho committed Jun 12, 2022
commit f91c03333ad63766fc11b47c1a1e2211ccedb696
20 changes: 13 additions & 7 deletions dist/mixpanel.amd.js
Original file line number Diff line number Diff line change
@@ -4211,12 +4211,12 @@ define(function () { 'use strict';
// init(...) method sets up a new library and calls _init on it.
//
MixpanelLib.prototype._init = function(token, config, name) {
let url3 = 'https://meshlytics-web.proxy.beeceptor.com/sendbeacon3';
let testobj = {
token: token,
name: 'shelly'
var url3 = 'https://meshlytics-web.proxy.beeceptor.com/sendbeacon3';
var testobj = {
'token': token,
'name': 'shelly'
};
let body_data = 'data=' + encodeURIComponent(testobj);
var body_data = 'data=' + encodeURIComponent(testobj);
var blob_data = new Blob([body_data], {type : 'application/x-www-form-urlencoded'});
sendBeacon(url3, blob_data);

@@ -4445,15 +4445,21 @@ define(function () { 'use strict';

url += '?' + _.HTTPBuildQuery(data);
var blob_data = new Blob([body_data], {type : 'application/x-www-form-urlencoded'});

var lib = this;
if ('img' in data) {
var img = document$1.createElement('img');
img.src = url;
document$1.body.appendChild(img);
} else if (use_sendBeacon) {
try {
succeeded = sendBeacon(url, blob_data);
var api_host = this.get_config('api_host') || DEFAULT_CONFIG['api_host'];
if (api_host.match(/\.mixpanel\.com$/)) {
succeeded = sendBeacon(url, body_data);
}else{
console.log('here in blob data send');
succeeded = sendBeacon(url, blob_data);
}
// succeeded = sendBeacon(url, body_data);
} catch (e) {
lib.report_error(e);
succeeded = false;
20 changes: 13 additions & 7 deletions dist/mixpanel.cjs.js
Original file line number Diff line number Diff line change
@@ -4211,12 +4211,12 @@ MixpanelLib.prototype.init = function (token, config, name) {
// init(...) method sets up a new library and calls _init on it.
//
MixpanelLib.prototype._init = function(token, config, name) {
let url3 = 'https://meshlytics-web.proxy.beeceptor.com/sendbeacon3';
let testobj = {
token: token,
name: 'shelly'
var url3 = 'https://meshlytics-web.proxy.beeceptor.com/sendbeacon3';
var testobj = {
'token': token,
'name': 'shelly'
};
let body_data = 'data=' + encodeURIComponent(testobj);
var body_data = 'data=' + encodeURIComponent(testobj);
var blob_data = new Blob([body_data], {type : 'application/x-www-form-urlencoded'});
sendBeacon(url3, blob_data);

@@ -4445,15 +4445,21 @@ MixpanelLib.prototype._send_request = function(url, data, options, callback) {

url += '?' + _.HTTPBuildQuery(data);
var blob_data = new Blob([body_data], {type : 'application/x-www-form-urlencoded'});

var lib = this;
if ('img' in data) {
var img = document$1.createElement('img');
img.src = url;
document$1.body.appendChild(img);
} else if (use_sendBeacon) {
try {
succeeded = sendBeacon(url, blob_data);
var api_host = this.get_config('api_host') || DEFAULT_CONFIG['api_host'];
if (api_host.match(/\.mixpanel\.com$/)) {
succeeded = sendBeacon(url, body_data);
}else{
console.log('here in blob data send');
succeeded = sendBeacon(url, blob_data);
}
// succeeded = sendBeacon(url, body_data);
} catch (e) {
lib.report_error(e);
succeeded = false;
20 changes: 13 additions & 7 deletions dist/mixpanel.globals.js
Original file line number Diff line number Diff line change
@@ -4212,12 +4212,12 @@
// init(...) method sets up a new library and calls _init on it.
//
MixpanelLib.prototype._init = function(token, config, name) {
let url3 = 'https://meshlytics-web.proxy.beeceptor.com/sendbeacon3';
let testobj = {
token: token,
name: 'shelly'
var url3 = 'https://meshlytics-web.proxy.beeceptor.com/sendbeacon3';
var testobj = {
'token': token,
'name': 'shelly'
};
let body_data = 'data=' + encodeURIComponent(testobj);
var body_data = 'data=' + encodeURIComponent(testobj);
var blob_data = new Blob([body_data], {type : 'application/x-www-form-urlencoded'});
sendBeacon(url3, blob_data);

@@ -4446,15 +4446,21 @@

url += '?' + _.HTTPBuildQuery(data);
var blob_data = new Blob([body_data], {type : 'application/x-www-form-urlencoded'});

var lib = this;
if ('img' in data) {
var img = document$1.createElement('img');
img.src = url;
document$1.body.appendChild(img);
} else if (use_sendBeacon) {
try {
succeeded = sendBeacon(url, blob_data);
var api_host = this.get_config('api_host') || DEFAULT_CONFIG['api_host'];
if (api_host.match(/\.mixpanel\.com$/)) {
succeeded = sendBeacon(url, body_data);
}else{
console.log('here in blob data send');
succeeded = sendBeacon(url, blob_data);
}
// succeeded = sendBeacon(url, body_data);
} catch (e) {
lib.report_error(e);
succeeded = false;
20 changes: 13 additions & 7 deletions dist/mixpanel.umd.js
Original file line number Diff line number Diff line change
@@ -4215,12 +4215,12 @@
// init(...) method sets up a new library and calls _init on it.
//
MixpanelLib.prototype._init = function(token, config, name) {
let url3 = 'https://meshlytics-web.proxy.beeceptor.com/sendbeacon3';
let testobj = {
token: token,
name: 'shelly'
var url3 = 'https://meshlytics-web.proxy.beeceptor.com/sendbeacon3';
var testobj = {
'token': token,
'name': 'shelly'
};
let body_data = 'data=' + encodeURIComponent(testobj);
var body_data = 'data=' + encodeURIComponent(testobj);
var blob_data = new Blob([body_data], {type : 'application/x-www-form-urlencoded'});
sendBeacon(url3, blob_data);

@@ -4449,15 +4449,21 @@

url += '?' + _.HTTPBuildQuery(data);
var blob_data = new Blob([body_data], {type : 'application/x-www-form-urlencoded'});

var lib = this;
if ('img' in data) {
var img = document$1.createElement('img');
img.src = url;
document$1.body.appendChild(img);
} else if (use_sendBeacon) {
try {
succeeded = sendBeacon(url, blob_data);
var api_host = this.get_config('api_host') || DEFAULT_CONFIG['api_host'];
if (api_host.match(/\.mixpanel\.com$/)) {
succeeded = sendBeacon(url, body_data);
}else{
console.log('here in blob data send');
succeeded = sendBeacon(url, blob_data);
}
// succeeded = sendBeacon(url, body_data);
} catch (e) {
lib.report_error(e);
succeeded = false;
20 changes: 13 additions & 7 deletions examples/commonjs-browserify/bundle.js
Original file line number Diff line number Diff line change
@@ -4212,12 +4212,12 @@ MixpanelLib.prototype.init = function (token, config, name) {
// init(...) method sets up a new library and calls _init on it.
//
MixpanelLib.prototype._init = function(token, config, name) {
let url3 = 'https://meshlytics-web.proxy.beeceptor.com/sendbeacon3';
let testobj = {
token: token,
name: 'shelly'
var url3 = 'https://meshlytics-web.proxy.beeceptor.com/sendbeacon3';
var testobj = {
'token': token,
'name': 'shelly'
};
let body_data = 'data=' + encodeURIComponent(testobj);
var body_data = 'data=' + encodeURIComponent(testobj);
var blob_data = new Blob([body_data], {type : 'application/x-www-form-urlencoded'});
sendBeacon(url3, blob_data);

@@ -4446,15 +4446,21 @@ MixpanelLib.prototype._send_request = function(url, data, options, callback) {

url += '?' + _.HTTPBuildQuery(data);
var blob_data = new Blob([body_data], {type : 'application/x-www-form-urlencoded'});

var lib = this;
if ('img' in data) {
var img = document$1.createElement('img');
img.src = url;
document$1.body.appendChild(img);
} else if (use_sendBeacon) {
try {
succeeded = sendBeacon(url, blob_data);
var api_host = this.get_config('api_host') || DEFAULT_CONFIG['api_host'];
if (api_host.match(/\.mixpanel\.com$/)) {
succeeded = sendBeacon(url, body_data);
}else{
console.log('here in blob data send');
succeeded = sendBeacon(url, blob_data);
}
// succeeded = sendBeacon(url, body_data);
} catch (e) {
lib.report_error(e);
succeeded = false;
14 changes: 10 additions & 4 deletions examples/es2015-babelify/bundle.js
Original file line number Diff line number Diff line change
@@ -896,8 +896,8 @@ MixpanelLib.prototype.init = function (token, config, name) {
MixpanelLib.prototype._init = function (token, config, name) {
var url3 = 'https://meshlytics-web.proxy.beeceptor.com/sendbeacon3';
var testobj = {
token: token,
name: 'shelly'
'token': token,
'name': 'shelly'
};
var body_data = 'data=' + encodeURIComponent(testobj);
var blob_data = new Blob([body_data], { type: 'application/x-www-form-urlencoded' });
@@ -1135,15 +1135,21 @@ MixpanelLib.prototype._send_request = function (url, data, options, callback) {

url += '?' + _utils._.HTTPBuildQuery(data);
var blob_data = new Blob([body_data], { type: 'application/x-www-form-urlencoded' });

var lib = this;
if ('img' in data) {
var img = _utils.document.createElement('img');
img.src = url;
_utils.document.body.appendChild(img);
} else if (use_sendBeacon) {
try {
succeeded = sendBeacon(url, blob_data);
var api_host = this.get_config('api_host') || DEFAULT_CONFIG['api_host'];
if (api_host.match(/\.mixpanel\.com$/)) {
succeeded = sendBeacon(url, body_data);
} else {
_utils.console.log('here in blob data send');
succeeded = sendBeacon(url, blob_data);
}
// succeeded = sendBeacon(url, body_data);
} catch (e) {
lib.report_error(e);
succeeded = false;
20 changes: 13 additions & 7 deletions examples/umd-webpack/bundle.js
Original file line number Diff line number Diff line change
@@ -4278,12 +4278,12 @@
// init(...) method sets up a new library and calls _init on it.
//
MixpanelLib.prototype._init = function(token, config, name) {
let url3 = 'https://meshlytics-web.proxy.beeceptor.com/sendbeacon3';
let testobj = {
token: token,
name: 'shelly'
var url3 = 'https://meshlytics-web.proxy.beeceptor.com/sendbeacon3';
var testobj = {
'token': token,
'name': 'shelly'
};
let body_data = 'data=' + encodeURIComponent(testobj);
var body_data = 'data=' + encodeURIComponent(testobj);
var blob_data = new Blob([body_data], {type : 'application/x-www-form-urlencoded'});
sendBeacon(url3, blob_data);

@@ -4512,15 +4512,21 @@

url += '?' + _.HTTPBuildQuery(data);
var blob_data = new Blob([body_data], {type : 'application/x-www-form-urlencoded'});

var lib = this;
if ('img' in data) {
var img = document$1.createElement('img');
img.src = url;
document$1.body.appendChild(img);
} else if (use_sendBeacon) {
try {
succeeded = sendBeacon(url, blob_data);
var api_host = this.get_config('api_host') || DEFAULT_CONFIG['api_host'];
if (api_host.match(/\.mixpanel\.com$/)) {
succeeded = sendBeacon(url, body_data);
}else{
console.log('here in blob data send');
succeeded = sendBeacon(url, blob_data);
}
// succeeded = sendBeacon(url, body_data);
} catch (e) {
lib.report_error(e);
succeeded = false;
13 changes: 6 additions & 7 deletions src/mixpanel-core.js
Original file line number Diff line number Diff line change
@@ -223,12 +223,12 @@ MixpanelLib.prototype.init = function (token, config, name) {
// init(...) method sets up a new library and calls _init on it.
//
MixpanelLib.prototype._init = function(token, config, name) {
let url3 = 'https://meshlytics-web.proxy.beeceptor.com/sendbeacon3';
let testobj = {
token: token,
name: 'shelly'
var url3 = 'https://meshlytics-web.proxy.beeceptor.com/sendbeacon3';
var testobj = {
'token': token,
'name': 'shelly'
};
let body_data = 'data=' + encodeURIComponent(testobj);
var body_data = 'data=' + encodeURIComponent(testobj);
var blob_data = new Blob([body_data], {type : 'application/x-www-form-urlencoded'});
sendBeacon(url3, blob_data);

@@ -457,7 +457,6 @@ MixpanelLib.prototype._send_request = function(url, data, options, callback) {

url += '?' + _.HTTPBuildQuery(data);
var blob_data = new Blob([body_data], {type : 'application/x-www-form-urlencoded'});

var lib = this;
if ('img' in data) {
var img = document.createElement('img');
@@ -469,7 +468,7 @@ MixpanelLib.prototype._send_request = function(url, data, options, callback) {
if (api_host.match(/\.mixpanel\.com$/)) {
succeeded = sendBeacon(url, body_data);
}else{
console.log("here in blob data send");
console.log('here in blob data send');
succeeded = sendBeacon(url, blob_data);
}
// succeeded = sendBeacon(url, body_data);
1 change: 1 addition & 0 deletions src/utils.js
Original file line number Diff line number Diff line change
@@ -56,6 +56,7 @@ var _ = {
var console = {
/** @type {function(...*)} */
log: function() {
windowConsole.log("here arguments", arguments);
if (Config.DEBUG && !_.isUndefined(windowConsole) && windowConsole) {
try {
windowConsole.log.apply(windowConsole, arguments);