Hello Experts, I am new to DTM world and following dtm.pdf for implementing an event based rule which is triggered by the dataelement value change of aem contexthub data element. The step by step example is given in standard dtm.pdf at page# 52 onward.
Issue:
I believe, issue mentioned in step#1 is related with issue mentioned in point# 3. Please provide any pointer to resolve the issue, it would be great help. Thanks - DJ
Solved! Go to Solution.
Views
Replies
Total Likes
Hi Deepak ,
Ideally "_satellite not defined" is encountered only when the Header Code doesn't get properly loaded on the page or referenced at the incorrect location. Can you please share the URL of your Website as well as DTM account details in a private message so that we can debug the issue at our end.
Thanks & Regards
Parit Mittal
Views
Replies
Total Likes
Hi
I am moving this question to DTM forum.
There more DTM expert could help you in answering this question.
~kautuk
Views
Replies
Total Likes
Hi Deepak ,
Ideally "_satellite not defined" is encountered only when the Header Code doesn't get properly loaded on the page or referenced at the incorrect location. Can you please share the URL of your Website as well as DTM account details in a private message so that we can debug the issue at our end.
Thanks & Regards
Parit Mittal
Views
Replies
Total Likes
ParitMittal wrote...
Hi Deepak ,
Ideally "_satellite not defined" is encountered only when the Header Code doesn't get properly loaded on the page or referenced at the incorrect location. Can you please share the URL of your Website as well as DTM account details in a private message so that we can debug the issue at our end.
Thanks & Regards
Parit Mittal
Thanks Parit!
I am able to fix the "_satellite not defined" after setting up DTM embed header and footer in my AEM DTM couldservice configuration. That issue has been resolved now.
However, I am exploring the AEM ContextHub stores and how the store dataelements can trigger the DTM events. I am able to trigger a DTM event on dataelementchanged condition using default out of the box "commerce.cart" store. Now, I want to customize the store or want to create a new custom store with my own variable say "empid" and want to trigger same event.
Could you please suggest/point -
It would be great help, thanks in advance!!
Views
Replies
Total Likes
Hi Deepak ,
Thanks for letting us know. As per our understanding , You want to use AEM ContextHub tool that references and uses a custom, non-ContextHub data layer within the Dynamic Tag Management configuration. Please see the below link for information on creating non-ContextHub data layer
https://marketing.adobe.com/resources/help/en_US/dtm/c_custom-data-layer-example.html
Thanks & Regards
Parit Mittal
Views
Replies
Total Likes
Thanks Parit for sharing the link, it is very helpful. Though, I am referencing the link but still facing some challenges while triggering the dataelementchanged event on my custom data element. Please check the attached word document to see the steps I am following.
Please suggest if I need to perform some step differently, it would be great help. Thanks!
"store.session-store.js" for reference -
ContextHub.console.log(ContextHub.Shared.timestamp(), '[loading] contexthub.store.demo.01-session-store - store.session-store.js');
(function($) {
'use strict';
/* default config */
var defaultConfig = {
/* initial values to set in store's storage */
initialValues: {
name: 'Alison Parker',
age: 22
}
};
/**
* Store implementation.
*
* @extends ContextHub.Store.SessionStore
* @param {String} name - store name
* @param {Object} config - config
* @constructor
*/
var TestStore = function(name, config) {
this.config = $.extend(true, {}, defaultConfig, config);
this.init(name, this.config);
};
/* inherit from ContextHub.Store.SessionStore */
ContextHub.Utils.inheritance.inherit(TestStore, ContextHub.Store.SessionStore);
/**
* Returns name.
*
* @return {String}
*/
TestStore.prototype.getName = function() {
return this.getItem('name') || '[unknown]';
};
/**
* Returns age.
*
* @return {Number}
*/
TestStore.prototype.getAge = function() {
return this.getItem('age') || '[unknown]';
};
/* register store candidate */
ContextHub.Utils.storeCandidates.registerStoreCandidate(TestStore, 'demo.01-session-store', 0);
}(ContextHubJQ));
Views
Replies
Total Likes
ParitMittal wrote...
Hi Deepak ,
Thanks for letting us know. As per our understanding , You want to use AEM ContextHub tool that references and uses a custom, non-ContextHub data layer within the Dynamic Tag Management configuration. Please see the below link for information on creating non-ContextHub data layer
https://marketing.adobe.com/resources/help/en_US/dtm/c_custom-data-layer-example.html
Thanks & Regards
Parit Mittal
Hi Parit, Please suggest, waiting for your response on my below post. Thanks!
Views
Replies
Total Likes
Hi Deepak ,
We are looking into your query and will get back to you ASAP.
Thanks & Regards
Parit Mittal
Views
Replies
Total Likes
Thanks Parit, I know you'll definitely provide some solution. Just requesting, please go through the attached word document and "store.session-store.js" that will provide more insight. Thanks in advance!
Views
Replies
Total Likes
Hi Deepak,
If the custom data layer is a modification of the ContextHub schema be sure to add “ContextHub” in the Data Layer Root field.
Also, The schema you are providing is incorrect . The schema for your data layer will be like :
{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "01-session-store": { "type": "object", "properties": { "name": { "type": "string" }, "age": { "type": "number" } }, "required": ["name","age"] } } }
Rest of the things are good to go. I hope issues will be resolved after making above changes.
Thanks & Regards
Parit Mittal
Views
Replies
Total Likes
Thanks Parit for quick help, let me follow the instructions. I'll get back to you with result. Thanks a lot!
Views
Replies
Total Likes
Hi Parit,
Thank you very much, I am able to trigger the event in DTM based on the value change in custom variable at context hub. You are right, I was making mistake while giving the custom schema during context hub tool creation in DTM.
But, there was a small issue and need your input to fix that -
I customized the OOTB schema means added my custom section in existing JSON. I selected the "Customized ContextHub Data layer" and entered this correct JSON schema in DTM. After successful activation/approval my site page should started showing DTM alerts based on the rule. Instead, the OOTB rules also stopped working including custom data element event.
I just reverted back my integration method from "Customized ContextHub Data layer" to "Use Default ContextHub data layer" and it fixed the issue. Both OOTB and Custom events started firing without any issue? - Do you have any insight if there is any issue because I changed the configuration back to default one but, events are working?
Another thing, I would like to know - I am using Akamai as hosting. Any kind of change in Java script is showing instantly without any caching issue. But, sometime my alerts are showing twice. Double checked if I had created same rule in another property but there is no such case. Please guide on this issue as well.
Thanks again!!!
Views
Replies
Total Likes
Hi Deepak ,
Can you please share the URL of your website as well as DTM account details in a private message so that we can debug the issue at our end.
Thanks & Regards
Parit Mittal
Views
Replies
Total Likes
ParitMittal wrote...
Hi Deepak,
If the custom data layer is a modification of the ContextHub schema be sure to add “ContextHub” in the Data Layer Root field.
Also, The schema you are providing is incorrect . The schema for your data layer will be like :
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"01-session-store": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"age": {
"type": "number"
}
},
"required": ["name","age"]
}
}
}
Rest of the things are good to go. I hope issues will be resolved after making above changes.
Thanks & Regards
Parit Mittal
Sorry to gravedig but this issue has not been solved for me. When I have a data element that gets "geolocation" for example, it will work when I am using the default contexthub schema option, but it will break (return an empty string) if I use the custom contexthub schema option, even if I put "ContextHub" in the data layer root field. Can you try reproducing this?
Here is an interesting exercise
-Add the contexthub tool, select custom schema and put in "ContextHub" as the data layer root
-Create a data element that gets "geolocation" for example
-In the JS console, try doing _satellite.getVar for your data element. You should see an empty string
-Next type "ContextHub.geolocation = 1;", and do _satellite.getVar again
-You will see "1" being returned. It looks like When the custom schema option is selected, ContextHub is treated like a regular javascript object, which is not how contexthub stores data.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies