You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@unomi.apache.org by dg...@apache.org on 2024/08/12 13:36:38 UTC
(unomi-tracker) branch move-logs-to-debug created (now 4b697a7)
This is an automated email from the ASF dual-hosted git repository.
dgriffon pushed a change to branch move-logs-to-debug
in repository https://gitbox.apache.org/repos/asf/unomi-tracker.git
at 4b697a7 UNOMI-844 : move console logs to debug
This branch includes the following new commits:
new 4b697a7 UNOMI-844 : move console logs to debug
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(unomi-tracker) 01/01: UNOMI-844 : move console logs to debug
Posted by dg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
dgriffon pushed a commit to branch move-logs-to-debug
in repository https://gitbox.apache.org/repos/asf/unomi-tracker.git
commit 4b697a7d8822731f57f2a0c1a9e1bbae5747d733
Author: david.griffon <dg...@jahia.com>
AuthorDate: Mon Aug 12 15:36:25 2024 +0200
UNOMI-844 : move console logs to debug
---
dist/apache-unomi-tracker.cjs.js | 38 ++++++++++++++++++------------------
dist/apache-unomi-tracker.cjs.js.map | 2 +-
dist/apache-unomi-tracker.esm.js | 38 ++++++++++++++++++------------------
dist/apache-unomi-tracker.esm.js.map | 2 +-
dist/apache-unomi-tracker.umd.js | 38 ++++++++++++++++++------------------
dist/apache-unomi-tracker.umd.js.map | 2 +-
src/apache-unomi-tracker.js | 38 ++++++++++++++++++------------------
7 files changed, 79 insertions(+), 79 deletions(-)
diff --git a/dist/apache-unomi-tracker.cjs.js b/dist/apache-unomi-tracker.cjs.js
index 44f54ba..e2a4f65 100644
--- a/dist/apache-unomi-tracker.cjs.js
+++ b/dist/apache-unomi-tracker.cjs.js
@@ -234,7 +234,7 @@ var newTracker = function newTracker() {
if (selectedFilter.event) {
// we now add control group information to event if the user is in the control group.
if (inControlGroup) {
- console.info('[WEM] Profile is in control group for target: ' + target + ', adding to personalization event...');
+ console.debug('[WEM] Profile is in control group for target: ' + target + ', adding to personalization event...');
selectedFilter.event.target.properties.inControlGroup = true;
if (selectedFilter.event.target.properties.variants) {
@@ -246,7 +246,7 @@ var newTracker = function newTracker() {
wem.collectEvent(wem._completeEvent(selectedFilter.event), function () {
- console.info('[WEM] Personalization event successfully collected.');
+ console.debug('[WEM] Personalization event successfully collected.');
}, function () {
console.error('[WEM] Could not send personalization event.');
}); //Trigger variant display event for personalization
@@ -454,7 +454,7 @@ var newTracker = function newTracker() {
var errorCallback = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
if (event.target.id || event.target.name) {
- console.info('[WEM] Send click event');
+ console.debug('[WEM] Send click event');
var targetId = event.target.id ? event.target.id : event.target.name;
var clickEvent = wem.buildEvent('click', wem.buildTarget(targetId, event.target.localName), wem.buildSourcePage());
var eventIndex = wem.eventsPrevented.indexOf(targetId);
@@ -466,7 +466,7 @@ var newTracker = function newTracker() {
event.preventDefault();
var target = event.target;
wem.collectEvent(clickEvent, function (xhr) {
- console.info('[WEM] Click event successfully collected.');
+ console.debug('[WEM] Click event successfully collected.');
if (successCallback) {
successCallback(xhr);
@@ -497,12 +497,12 @@ var newTracker = function newTracker() {
sendVideoEvent: function sendVideoEvent(event) {
var successCallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
var errorCallback = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
- console.info('[WEM] catching video event');
+ console.debug('[WEM] catching video event');
var videoEvent = wem.buildEvent('video', wem.buildTarget(event.target.id, 'video', {
action: event.type
}), wem.buildSourcePage());
wem.collectEvent(videoEvent, function (xhr) {
- console.info('[WEM] Video event successfully collected.');
+ console.debug('[WEM] Video event successfully collected.');
if (successCallback) {
successCallback(xhr);
@@ -922,7 +922,7 @@ var newTracker = function newTracker() {
* @return {undefined}
*/
_registerListenersForTrackedConditions: function _registerListenersForTrackedConditions() {
- console.info('[WEM] Check for tracked conditions and attach related HTML listeners');
+ console.debug('[WEM] Check for tracked conditions and attach related HTML listeners');
var videoNamesToWatch = [];
var clickToWatch = [];
@@ -961,7 +961,7 @@ var newTracker = function newTracker() {
if (formName && wem.formNamesToWatch.indexOf(formName) > -1 && form.getAttribute('data-form-id') == null) {
// add submit listener on form that we need to watch only
- console.info('[WEM] Watching form ' + formName);
+ console.debug('[WEM] Watching form ' + formName);
form.addEventListener('submit', wem._formSubmitEventListener, true);
}
}
@@ -973,7 +973,7 @@ var newTracker = function newTracker() {
if (video) {
video.addEventListener('play', wem.sendVideoEvent);
video.addEventListener('ended', wem.sendVideoEvent);
- console.info('[WEM] Watching video ' + videoName);
+ console.debug('[WEM] Watching video ' + videoName);
} else {
console.warn('[WEM] Unable to watch video ' + videoName + ', video not found in the page');
}
@@ -985,7 +985,7 @@ var newTracker = function newTracker() {
if (click) {
click.addEventListener('click', wem.sendClickEvent);
- console.info('[WEM] Watching click ' + clickIdName);
+ console.debug('[WEM] Watching click ' + clickIdName);
} else {
console.warn('[WEM] Unable to watch click ' + clickIdName + ', element not found in the page');
}
@@ -1189,14 +1189,14 @@ var newTracker = function newTracker() {
if (wem.digitalData) {
if (wem.cxs) {
- console.info('[WEM] Trying to register context load callback, but context already loaded, executing now...');
+ console.debug('[WEM] Trying to register context load callback, but context already loaded, executing now...');
if (onLoadCallback) {
- console.info('[WEM] executing context load callback: ' + (name ? name : 'Callback without name'));
+ console.debug('[WEM] executing context load callback: ' + (name ? name : 'Callback without name'));
onLoadCallback(wem.digitalData);
}
} else {
- console.info('[WEM] registering context load callback: ' + (name ? name : 'Callback without name'));
+ console.debug('[WEM] registering context load callback: ' + (name ? name : 'Callback without name'));
if (onLoadCallback) {
wem.digitalData.loadCallbacks = wem.digitalData.loadCallbacks || [];
@@ -1208,7 +1208,7 @@ var newTracker = function newTracker() {
}
}
} else {
- console.info('[WEM] Trying to register context load callback, but no digitalData conf found, creating it and registering the callback: ' + (name ? name : 'Callback without name'));
+ console.debug('[WEM] Trying to register context load callback, but no digitalData conf found, creating it and registering the callback: ' + (name ? name : 'Callback without name'));
wem.digitalData = {};
if (onLoadCallback) {
@@ -1234,7 +1234,7 @@ var newTracker = function newTracker() {
if (wem.cxs) {
console.error('[WEM] already loaded, too late...');
} else {
- console.info('[WEM] digitalData object present but not loaded, registering sort callback...');
+ console.debug('[WEM] digitalData object present but not loaded, registering sort callback...');
wem.digitalData.personalizationCallback = wem.digitalData.personalizationCallback || [];
wem.digitalData.personalizationCallback.push({
personalization: personalization,
@@ -1284,7 +1284,7 @@ var newTracker = function newTracker() {
wem.cxs = JSON.parse(xhr.responseText);
if (wem.digitalData.loadCallbacks && wem.digitalData.loadCallbacks.length > 0) {
- console.info('[WEM] Found context server load callbacks, calling now...');
+ console.debug('[WEM] Found context server load callbacks, calling now...');
wem._executeLoadCallbacks(wem.digitalData);
@@ -1334,7 +1334,7 @@ var newTracker = function newTracker() {
wem.digitalData.loadCallbacks.sort(function (a, b) {
return a.priority - b.priority;
}).forEach(function (loadCallback) {
- console.info('[WEM] executing context load callback: ' + (loadCallback.name ? loadCallback.name : 'callback without name'));
+ console.debug('[WEM] executing context load callback: ' + (loadCallback.name ? loadCallback.name : 'callback without name'));
loadCallback.execute(callbackParam);
});
}
@@ -1399,12 +1399,12 @@ var newTracker = function newTracker() {
* @return {undefined}
*/
_formSubmitEventListener: function _formSubmitEventListener(event) {
- console.info('[WEM] Registering form event callback');
+ console.debug('[WEM] Registering form event callback');
var form = event.target;
var formName = form.getAttribute('name') ? form.getAttribute('name') : form.getAttribute('id');
if (formName && wem.formNamesToWatch.indexOf(formName) > -1) {
- console.info('[WEM] catching form ' + formName);
+ console.debug('[WEM] catching form ' + formName);
var eventCopy = document.createEvent('Event'); // Define that the event name is 'build'.
eventCopy.initEvent('submit', event.bubbles, event.cancelable);
diff --git a/dist/apache-unomi-tracker.cjs.js.map b/dist/apache-unomi-tracker.cjs.js.map
index 9475097..6eccf2a 100644
--- a/dist/apache-unomi-tracker.cjs.js.map
+++ b/dist/apache-unomi-tracker.cjs.js.map
@@ -1 +1 @@
-{"version":3,"file":"apache-unomi-tracker.cjs.js","sources":["../src/apache-unomi-tracker.js","../src/index.js"],"sourcesContent":["/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compl [...]
\ No newline at end of file
+{"version":3,"file":"apache-unomi-tracker.cjs.js","sources":["../src/apache-unomi-tracker.js","../src/index.js"],"sourcesContent":["/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compl [...]
\ No newline at end of file
diff --git a/dist/apache-unomi-tracker.esm.js b/dist/apache-unomi-tracker.esm.js
index 26b096f..acb4d9b 100644
--- a/dist/apache-unomi-tracker.esm.js
+++ b/dist/apache-unomi-tracker.esm.js
@@ -226,7 +226,7 @@ var newTracker = function newTracker() {
if (selectedFilter.event) {
// we now add control group information to event if the user is in the control group.
if (inControlGroup) {
- console.info('[WEM] Profile is in control group for target: ' + target + ', adding to personalization event...');
+ console.debug('[WEM] Profile is in control group for target: ' + target + ', adding to personalization event...');
selectedFilter.event.target.properties.inControlGroup = true;
if (selectedFilter.event.target.properties.variants) {
@@ -238,7 +238,7 @@ var newTracker = function newTracker() {
wem.collectEvent(wem._completeEvent(selectedFilter.event), function () {
- console.info('[WEM] Personalization event successfully collected.');
+ console.debug('[WEM] Personalization event successfully collected.');
}, function () {
console.error('[WEM] Could not send personalization event.');
}); //Trigger variant display event for personalization
@@ -446,7 +446,7 @@ var newTracker = function newTracker() {
var errorCallback = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
if (event.target.id || event.target.name) {
- console.info('[WEM] Send click event');
+ console.debug('[WEM] Send click event');
var targetId = event.target.id ? event.target.id : event.target.name;
var clickEvent = wem.buildEvent('click', wem.buildTarget(targetId, event.target.localName), wem.buildSourcePage());
var eventIndex = wem.eventsPrevented.indexOf(targetId);
@@ -458,7 +458,7 @@ var newTracker = function newTracker() {
event.preventDefault();
var target = event.target;
wem.collectEvent(clickEvent, function (xhr) {
- console.info('[WEM] Click event successfully collected.');
+ console.debug('[WEM] Click event successfully collected.');
if (successCallback) {
successCallback(xhr);
@@ -489,12 +489,12 @@ var newTracker = function newTracker() {
sendVideoEvent: function sendVideoEvent(event) {
var successCallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
var errorCallback = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
- console.info('[WEM] catching video event');
+ console.debug('[WEM] catching video event');
var videoEvent = wem.buildEvent('video', wem.buildTarget(event.target.id, 'video', {
action: event.type
}), wem.buildSourcePage());
wem.collectEvent(videoEvent, function (xhr) {
- console.info('[WEM] Video event successfully collected.');
+ console.debug('[WEM] Video event successfully collected.');
if (successCallback) {
successCallback(xhr);
@@ -914,7 +914,7 @@ var newTracker = function newTracker() {
* @return {undefined}
*/
_registerListenersForTrackedConditions: function _registerListenersForTrackedConditions() {
- console.info('[WEM] Check for tracked conditions and attach related HTML listeners');
+ console.debug('[WEM] Check for tracked conditions and attach related HTML listeners');
var videoNamesToWatch = [];
var clickToWatch = [];
@@ -953,7 +953,7 @@ var newTracker = function newTracker() {
if (formName && wem.formNamesToWatch.indexOf(formName) > -1 && form.getAttribute('data-form-id') == null) {
// add submit listener on form that we need to watch only
- console.info('[WEM] Watching form ' + formName);
+ console.debug('[WEM] Watching form ' + formName);
form.addEventListener('submit', wem._formSubmitEventListener, true);
}
}
@@ -965,7 +965,7 @@ var newTracker = function newTracker() {
if (video) {
video.addEventListener('play', wem.sendVideoEvent);
video.addEventListener('ended', wem.sendVideoEvent);
- console.info('[WEM] Watching video ' + videoName);
+ console.debug('[WEM] Watching video ' + videoName);
} else {
console.warn('[WEM] Unable to watch video ' + videoName + ', video not found in the page');
}
@@ -977,7 +977,7 @@ var newTracker = function newTracker() {
if (click) {
click.addEventListener('click', wem.sendClickEvent);
- console.info('[WEM] Watching click ' + clickIdName);
+ console.debug('[WEM] Watching click ' + clickIdName);
} else {
console.warn('[WEM] Unable to watch click ' + clickIdName + ', element not found in the page');
}
@@ -1181,14 +1181,14 @@ var newTracker = function newTracker() {
if (wem.digitalData) {
if (wem.cxs) {
- console.info('[WEM] Trying to register context load callback, but context already loaded, executing now...');
+ console.debug('[WEM] Trying to register context load callback, but context already loaded, executing now...');
if (onLoadCallback) {
- console.info('[WEM] executing context load callback: ' + (name ? name : 'Callback without name'));
+ console.debug('[WEM] executing context load callback: ' + (name ? name : 'Callback without name'));
onLoadCallback(wem.digitalData);
}
} else {
- console.info('[WEM] registering context load callback: ' + (name ? name : 'Callback without name'));
+ console.debug('[WEM] registering context load callback: ' + (name ? name : 'Callback without name'));
if (onLoadCallback) {
wem.digitalData.loadCallbacks = wem.digitalData.loadCallbacks || [];
@@ -1200,7 +1200,7 @@ var newTracker = function newTracker() {
}
}
} else {
- console.info('[WEM] Trying to register context load callback, but no digitalData conf found, creating it and registering the callback: ' + (name ? name : 'Callback without name'));
+ console.debug('[WEM] Trying to register context load callback, but no digitalData conf found, creating it and registering the callback: ' + (name ? name : 'Callback without name'));
wem.digitalData = {};
if (onLoadCallback) {
@@ -1226,7 +1226,7 @@ var newTracker = function newTracker() {
if (wem.cxs) {
console.error('[WEM] already loaded, too late...');
} else {
- console.info('[WEM] digitalData object present but not loaded, registering sort callback...');
+ console.debug('[WEM] digitalData object present but not loaded, registering sort callback...');
wem.digitalData.personalizationCallback = wem.digitalData.personalizationCallback || [];
wem.digitalData.personalizationCallback.push({
personalization: personalization,
@@ -1276,7 +1276,7 @@ var newTracker = function newTracker() {
wem.cxs = JSON.parse(xhr.responseText);
if (wem.digitalData.loadCallbacks && wem.digitalData.loadCallbacks.length > 0) {
- console.info('[WEM] Found context server load callbacks, calling now...');
+ console.debug('[WEM] Found context server load callbacks, calling now...');
wem._executeLoadCallbacks(wem.digitalData);
@@ -1326,7 +1326,7 @@ var newTracker = function newTracker() {
wem.digitalData.loadCallbacks.sort(function (a, b) {
return a.priority - b.priority;
}).forEach(function (loadCallback) {
- console.info('[WEM] executing context load callback: ' + (loadCallback.name ? loadCallback.name : 'callback without name'));
+ console.debug('[WEM] executing context load callback: ' + (loadCallback.name ? loadCallback.name : 'callback without name'));
loadCallback.execute(callbackParam);
});
}
@@ -1391,12 +1391,12 @@ var newTracker = function newTracker() {
* @return {undefined}
*/
_formSubmitEventListener: function _formSubmitEventListener(event) {
- console.info('[WEM] Registering form event callback');
+ console.debug('[WEM] Registering form event callback');
var form = event.target;
var formName = form.getAttribute('name') ? form.getAttribute('name') : form.getAttribute('id');
if (formName && wem.formNamesToWatch.indexOf(formName) > -1) {
- console.info('[WEM] catching form ' + formName);
+ console.debug('[WEM] catching form ' + formName);
var eventCopy = document.createEvent('Event'); // Define that the event name is 'build'.
eventCopy.initEvent('submit', event.bubbles, event.cancelable);
diff --git a/dist/apache-unomi-tracker.esm.js.map b/dist/apache-unomi-tracker.esm.js.map
index 46a05df..39ddd18 100644
--- a/dist/apache-unomi-tracker.esm.js.map
+++ b/dist/apache-unomi-tracker.esm.js.map
@@ -1 +1 @@
-{"version":3,"file":"apache-unomi-tracker.esm.js","sources":["../src/apache-unomi-tracker.js","../src/index.js"],"sourcesContent":["/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compl [...]
\ No newline at end of file
+{"version":3,"file":"apache-unomi-tracker.esm.js","sources":["../src/apache-unomi-tracker.js","../src/index.js"],"sourcesContent":["/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compl [...]
\ No newline at end of file
diff --git a/dist/apache-unomi-tracker.umd.js b/dist/apache-unomi-tracker.umd.js
index 6f811e9..8410447 100644
--- a/dist/apache-unomi-tracker.umd.js
+++ b/dist/apache-unomi-tracker.umd.js
@@ -1881,7 +1881,7 @@
if (selectedFilter.event) {
// we now add control group information to event if the user is in the control group.
if (inControlGroup) {
- console.info('[WEM] Profile is in control group for target: ' + target + ', adding to personalization event...');
+ console.debug('[WEM] Profile is in control group for target: ' + target + ', adding to personalization event...');
selectedFilter.event.target.properties.inControlGroup = true;
if (selectedFilter.event.target.properties.variants) {
@@ -1893,7 +1893,7 @@
wem.collectEvent(wem._completeEvent(selectedFilter.event), function () {
- console.info('[WEM] Personalization event successfully collected.');
+ console.debug('[WEM] Personalization event successfully collected.');
}, function () {
console.error('[WEM] Could not send personalization event.');
}); //Trigger variant display event for personalization
@@ -2101,7 +2101,7 @@
var errorCallback = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
if (event.target.id || event.target.name) {
- console.info('[WEM] Send click event');
+ console.debug('[WEM] Send click event');
var targetId = event.target.id ? event.target.id : event.target.name;
var clickEvent = wem.buildEvent('click', wem.buildTarget(targetId, event.target.localName), wem.buildSourcePage());
var eventIndex = wem.eventsPrevented.indexOf(targetId);
@@ -2113,7 +2113,7 @@
event.preventDefault();
var target = event.target;
wem.collectEvent(clickEvent, function (xhr) {
- console.info('[WEM] Click event successfully collected.');
+ console.debug('[WEM] Click event successfully collected.');
if (successCallback) {
successCallback(xhr);
@@ -2144,12 +2144,12 @@
sendVideoEvent: function sendVideoEvent(event) {
var successCallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
var errorCallback = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
- console.info('[WEM] catching video event');
+ console.debug('[WEM] catching video event');
var videoEvent = wem.buildEvent('video', wem.buildTarget(event.target.id, 'video', {
action: event.type
}), wem.buildSourcePage());
wem.collectEvent(videoEvent, function (xhr) {
- console.info('[WEM] Video event successfully collected.');
+ console.debug('[WEM] Video event successfully collected.');
if (successCallback) {
successCallback(xhr);
@@ -2569,7 +2569,7 @@
* @return {undefined}
*/
_registerListenersForTrackedConditions: function _registerListenersForTrackedConditions() {
- console.info('[WEM] Check for tracked conditions and attach related HTML listeners');
+ console.debug('[WEM] Check for tracked conditions and attach related HTML listeners');
var videoNamesToWatch = [];
var clickToWatch = [];
@@ -2608,7 +2608,7 @@
if (formName && wem.formNamesToWatch.indexOf(formName) > -1 && form.getAttribute('data-form-id') == null) {
// add submit listener on form that we need to watch only
- console.info('[WEM] Watching form ' + formName);
+ console.debug('[WEM] Watching form ' + formName);
form.addEventListener('submit', wem._formSubmitEventListener, true);
}
}
@@ -2620,7 +2620,7 @@
if (video) {
video.addEventListener('play', wem.sendVideoEvent);
video.addEventListener('ended', wem.sendVideoEvent);
- console.info('[WEM] Watching video ' + videoName);
+ console.debug('[WEM] Watching video ' + videoName);
} else {
console.warn('[WEM] Unable to watch video ' + videoName + ', video not found in the page');
}
@@ -2632,7 +2632,7 @@
if (click) {
click.addEventListener('click', wem.sendClickEvent);
- console.info('[WEM] Watching click ' + clickIdName);
+ console.debug('[WEM] Watching click ' + clickIdName);
} else {
console.warn('[WEM] Unable to watch click ' + clickIdName + ', element not found in the page');
}
@@ -2836,14 +2836,14 @@
if (wem.digitalData) {
if (wem.cxs) {
- console.info('[WEM] Trying to register context load callback, but context already loaded, executing now...');
+ console.debug('[WEM] Trying to register context load callback, but context already loaded, executing now...');
if (onLoadCallback) {
- console.info('[WEM] executing context load callback: ' + (name ? name : 'Callback without name'));
+ console.debug('[WEM] executing context load callback: ' + (name ? name : 'Callback without name'));
onLoadCallback(wem.digitalData);
}
} else {
- console.info('[WEM] registering context load callback: ' + (name ? name : 'Callback without name'));
+ console.debug('[WEM] registering context load callback: ' + (name ? name : 'Callback without name'));
if (onLoadCallback) {
wem.digitalData.loadCallbacks = wem.digitalData.loadCallbacks || [];
@@ -2855,7 +2855,7 @@
}
}
} else {
- console.info('[WEM] Trying to register context load callback, but no digitalData conf found, creating it and registering the callback: ' + (name ? name : 'Callback without name'));
+ console.debug('[WEM] Trying to register context load callback, but no digitalData conf found, creating it and registering the callback: ' + (name ? name : 'Callback without name'));
wem.digitalData = {};
if (onLoadCallback) {
@@ -2881,7 +2881,7 @@
if (wem.cxs) {
console.error('[WEM] already loaded, too late...');
} else {
- console.info('[WEM] digitalData object present but not loaded, registering sort callback...');
+ console.debug('[WEM] digitalData object present but not loaded, registering sort callback...');
wem.digitalData.personalizationCallback = wem.digitalData.personalizationCallback || [];
wem.digitalData.personalizationCallback.push({
personalization: personalization,
@@ -2931,7 +2931,7 @@
wem.cxs = JSON.parse(xhr.responseText);
if (wem.digitalData.loadCallbacks && wem.digitalData.loadCallbacks.length > 0) {
- console.info('[WEM] Found context server load callbacks, calling now...');
+ console.debug('[WEM] Found context server load callbacks, calling now...');
wem._executeLoadCallbacks(wem.digitalData);
@@ -2981,7 +2981,7 @@
wem.digitalData.loadCallbacks.sort(function (a, b) {
return a.priority - b.priority;
}).forEach(function (loadCallback) {
- console.info('[WEM] executing context load callback: ' + (loadCallback.name ? loadCallback.name : 'callback without name'));
+ console.debug('[WEM] executing context load callback: ' + (loadCallback.name ? loadCallback.name : 'callback without name'));
loadCallback.execute(callbackParam);
});
}
@@ -3046,12 +3046,12 @@
* @return {undefined}
*/
_formSubmitEventListener: function _formSubmitEventListener(event) {
- console.info('[WEM] Registering form event callback');
+ console.debug('[WEM] Registering form event callback');
var form = event.target;
var formName = form.getAttribute('name') ? form.getAttribute('name') : form.getAttribute('id');
if (formName && wem.formNamesToWatch.indexOf(formName) > -1) {
- console.info('[WEM] catching form ' + formName);
+ console.debug('[WEM] catching form ' + formName);
var eventCopy = document.createEvent('Event'); // Define that the event name is 'build'.
eventCopy.initEvent('submit', event.bubbles, event.cancelable);
diff --git a/dist/apache-unomi-tracker.umd.js.map b/dist/apache-unomi-tracker.umd.js.map
index cc73bfe..73ad609 100644
--- a/dist/apache-unomi-tracker.umd.js.map
+++ b/dist/apache-unomi-tracker.umd.js.map
@@ -1 +1 @@
-{"version":3,"file":"apache-unomi-tracker.umd.js","sources":["../node_modules/@babel/runtime/helpers/esm/typeof.js","../node_modules/es6-crawler-detect/src/lib/crawler/provider.js","../node_modules/es6-crawler-detect/src/lib/crawler/crawlers.js","../node_modules/es6-crawler-detect/src/lib/crawler/exclusions.js","../node_modules/es6-crawler-detect/src/lib/crawler/headers.js","../node_modules/es6-crawler-detect/src/lib/crawler.js","../node_modules/es6-crawler-detect/src/index.js","../src/a [...]
\ No newline at end of file
+{"version":3,"file":"apache-unomi-tracker.umd.js","sources":["../node_modules/@babel/runtime/helpers/esm/typeof.js","../node_modules/es6-crawler-detect/src/lib/crawler/provider.js","../node_modules/es6-crawler-detect/src/lib/crawler/crawlers.js","../node_modules/es6-crawler-detect/src/lib/crawler/exclusions.js","../node_modules/es6-crawler-detect/src/lib/crawler/headers.js","../node_modules/es6-crawler-detect/src/lib/crawler.js","../node_modules/es6-crawler-detect/src/index.js","../src/a [...]
\ No newline at end of file
diff --git a/src/apache-unomi-tracker.js b/src/apache-unomi-tracker.js
index 9256eae..dd5c6ee 100644
--- a/src/apache-unomi-tracker.js
+++ b/src/apache-unomi-tracker.js
@@ -210,7 +210,7 @@ export const newTracker = () => {
if (selectedFilter.event) {
// we now add control group information to event if the user is in the control group.
if (inControlGroup) {
- console.info('[WEM] Profile is in control group for target: ' + target + ', adding to personalization event...');
+ console.debug('[WEM] Profile is in control group for target: ' + target + ', adding to personalization event...');
selectedFilter.event.target.properties.inControlGroup = true;
if (selectedFilter.event.target.properties.variants) {
selectedFilter.event.target.properties.variants.forEach(variant => variant.inControlGroup = true);
@@ -219,7 +219,7 @@ export const newTracker = () => {
// send event to unomi
wem.collectEvent(wem._completeEvent(selectedFilter.event), function () {
- console.info('[WEM] Personalization event successfully collected.');
+ console.debug('[WEM] Personalization event successfully collected.');
}, function () {
console.error('[WEM] Could not send personalization event.');
});
@@ -405,7 +405,7 @@ export const newTracker = () => {
*/
sendClickEvent: function (event, successCallback = undefined, errorCallback = undefined) {
if (event.target.id || event.target.name) {
- console.info('[WEM] Send click event');
+ console.debug('[WEM] Send click event');
var targetId = event.target.id ? event.target.id : event.target.name;
var clickEvent = wem.buildEvent('click',
wem.buildTarget(targetId, event.target.localName),
@@ -422,7 +422,7 @@ export const newTracker = () => {
var target = event.target;
wem.collectEvent(clickEvent, function (xhr) {
- console.info('[WEM] Click event successfully collected.');
+ console.debug('[WEM] Click event successfully collected.');
if (successCallback) {
successCallback(xhr);
} else {
@@ -449,11 +449,11 @@ export const newTracker = () => {
* @return {undefined}
*/
sendVideoEvent: function (event, successCallback = undefined, errorCallback = undefined) {
- console.info('[WEM] catching video event');
+ console.debug('[WEM] catching video event');
var videoEvent = wem.buildEvent('video', wem.buildTarget(event.target.id, 'video', { action: event.type }), wem.buildSourcePage());
wem.collectEvent(videoEvent, function (xhr) {
- console.info('[WEM] Video event successfully collected.');
+ console.debug('[WEM] Video event successfully collected.');
if (successCallback) {
successCallback(xhr);
}
@@ -840,7 +840,7 @@ export const newTracker = () => {
* @return {undefined}
*/
_registerListenersForTrackedConditions: function () {
- console.info('[WEM] Check for tracked conditions and attach related HTML listeners');
+ console.debug('[WEM] Check for tracked conditions and attach related HTML listeners');
var videoNamesToWatch = [];
var clickToWatch = [];
@@ -874,7 +874,7 @@ export const newTracker = () => {
// test attribute data-form-id to not add a listener on FF form
if (formName && wem.formNamesToWatch.indexOf(formName) > -1 && form.getAttribute('data-form-id') == null) {
// add submit listener on form that we need to watch only
- console.info('[WEM] Watching form ' + formName);
+ console.debug('[WEM] Watching form ' + formName);
form.addEventListener('submit', wem._formSubmitEventListener, true);
}
}
@@ -886,7 +886,7 @@ export const newTracker = () => {
if (video) {
video.addEventListener('play', wem.sendVideoEvent);
video.addEventListener('ended', wem.sendVideoEvent);
- console.info('[WEM] Watching video ' + videoName);
+ console.debug('[WEM] Watching video ' + videoName);
} else {
console.warn('[WEM] Unable to watch video ' + videoName + ', video not found in the page');
}
@@ -899,7 +899,7 @@ export const newTracker = () => {
: document.getElementsByName(clickIdName)[0];
if (click) {
click.addEventListener('click', wem.sendClickEvent);
- console.info('[WEM] Watching click ' + clickIdName);
+ console.debug('[WEM] Watching click ' + clickIdName);
} else {
console.warn('[WEM] Unable to watch click ' + clickIdName + ', element not found in the page');
}
@@ -1064,13 +1064,13 @@ export const newTracker = () => {
_registerCallback: function (onLoadCallback, name = undefined, priority = 5) {
if (wem.digitalData) {
if (wem.cxs) {
- console.info('[WEM] Trying to register context load callback, but context already loaded, executing now...');
+ console.debug('[WEM] Trying to register context load callback, but context already loaded, executing now...');
if (onLoadCallback) {
- console.info('[WEM] executing context load callback: ' + (name ? name : 'Callback without name'));
+ console.debug('[WEM] executing context load callback: ' + (name ? name : 'Callback without name'));
onLoadCallback(wem.digitalData);
}
} else {
- console.info('[WEM] registering context load callback: ' + (name ? name : 'Callback without name'));
+ console.debug('[WEM] registering context load callback: ' + (name ? name : 'Callback without name'));
if (onLoadCallback) {
wem.digitalData.loadCallbacks = wem.digitalData.loadCallbacks || [];
wem.digitalData.loadCallbacks.push({
@@ -1081,7 +1081,7 @@ export const newTracker = () => {
}
}
} else {
- console.info('[WEM] Trying to register context load callback, but no digitalData conf found, creating it and registering the callback: ' + (name ? name : 'Callback without name'));
+ console.debug('[WEM] Trying to register context load callback, but no digitalData conf found, creating it and registering the callback: ' + (name ? name : 'Callback without name'));
wem.digitalData = {};
if (onLoadCallback) {
wem.digitalData.loadCallbacks = [];
@@ -1106,7 +1106,7 @@ export const newTracker = () => {
if (wem.cxs) {
console.error('[WEM] already loaded, too late...');
} else {
- console.info('[WEM] digitalData object present but not loaded, registering sort callback...');
+ console.debug('[WEM] digitalData object present but not loaded, registering sort callback...');
wem.digitalData.personalizationCallback = wem.digitalData.personalizationCallback || [];
wem.digitalData.personalizationCallback.push({ personalization: personalization, callback: callback });
}
@@ -1149,7 +1149,7 @@ export const newTracker = () => {
wem.cxs = JSON.parse(xhr.responseText);
if (wem.digitalData.loadCallbacks && wem.digitalData.loadCallbacks.length > 0) {
- console.info('[WEM] Found context server load callbacks, calling now...');
+ console.debug('[WEM] Found context server load callbacks, calling now...');
wem._executeLoadCallbacks(wem.digitalData);
if (wem.digitalData.personalizationCallback) {
@@ -1197,7 +1197,7 @@ export const newTracker = () => {
wem.digitalData.loadCallbacks
.sort((a, b) => a.priority - b.priority)
.forEach(loadCallback => {
- console.info('[WEM] executing context load callback: ' + (loadCallback.name ? loadCallback.name : 'callback without name'));
+ console.debug('[WEM] executing context load callback: ' + (loadCallback.name ? loadCallback.name : 'callback without name'));
loadCallback.execute(callbackParam);
});
}
@@ -1258,11 +1258,11 @@ export const newTracker = () => {
* @return {undefined}
*/
_formSubmitEventListener: function (event) {
- console.info('[WEM] Registering form event callback');
+ console.debug('[WEM] Registering form event callback');
var form = event.target;
var formName = form.getAttribute('name') ? form.getAttribute('name') : form.getAttribute('id');
if (formName && wem.formNamesToWatch.indexOf(formName) > -1) {
- console.info('[WEM] catching form ' + formName);
+ console.debug('[WEM] catching form ' + formName);
var eventCopy = document.createEvent('Event');
// Define that the event name is 'build'.