You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@unomi.apache.org by GitBox <gi...@apache.org> on 2022/09/27 16:16:11 UTC
[GitHub] [unomi-tracker] jsinovassin opened a new pull request, #10: UNOMI-679 : add displayed variant informations in the window object
jsinovassin opened a new pull request, #10:
URL: https://github.com/apache/unomi-tracker/pull/10
https://issues.apache.org/jira/browse/UNOMI-679
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@unomi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [unomi-tracker] jkevan commented on a diff in pull request #10: UNOMI-679 : add displayed variant informations in the window object
Posted by GitBox <gi...@apache.org>.
jkevan commented on code in PR #10:
URL: https://github.com/apache/unomi-tracker/pull/10#discussion_r982579842
##########
src/apache-unomi-tracker.js:
##########
@@ -728,7 +728,18 @@ export const newTracker = () => {
event.initCustomEvent(name, canBubble, cancelable, detail);
document.dispatchEvent(event);
},
-
+ /**
+ * Fill the window.digitalData.displayedVariants with the javascript event passed as parameter
+ * @param {object} jsEvent javascript event
+ * @private
+ * @return {undefined}
+ */
+ _fillDisplayedVariants: (jsEvent) => {
+ if (!window.digitalData.displayedVariants) {
+ window.digitalData.displayedVariants = [];
+ }
+ window.digitalData.displayedVariants.push(jsEvent);
Review Comment:
digitalData is not stored in the window like it use to be when the tracker was in wem.js in jExperience.
Now the digitallData is stored in the tracker itself.
So this cannot work properly if the tracker is used outside jExperience.
(jExperience is using a callback to store it in the window, but this should not be done in the tracker directly.)
So you could just replace **window** by: **wem** here.
And it should work properly.
Take a look at jExperience callbacks to si how jExperience is catching the result of wem.digitallData.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@unomi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [unomi-tracker] jkevan commented on pull request #10: UNOMI-679 : add displayed variant informations in the window object
Posted by GitBox <gi...@apache.org>.
jkevan commented on PR #10:
URL: https://github.com/apache/unomi-tracker/pull/10#issuecomment-1261929551
I think we should upgrade the version in package.json to 1.1.0 for next development iteration
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@unomi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org