Hi Community ,
I am practicing Web Sdk and Adobe Analytics ,and want to add some object into existing Data layer can i add new object data into data layer ?
Demo websites I used for Web Sdk and analytics implementation : https://geometrixx.awsus3.cdn-alpha.com/index.html
Thanks,
Rishank
Solved! Go to Solution.
Views
Replies
Total Likes
the demo page uses a "digitalData" data layer. Obviously, if you want to add anything to it, you will have to do that via custom code you run in your console or inject with your tag manager.
For instance, to add a "language" field, you could do
digitalData.page.language = "en";
Views
Replies
Total Likes
the demo page uses a "digitalData" data layer. Obviously, if you want to add anything to it, you will have to do that via custom code you run in your console or inject with your tag manager.
For instance, to add a "language" field, you could do
digitalData.page.language = "en";
Views
Replies
Total Likes
Hi @bjoern__koth ,
Thanks for quick reply , the way you add "language" field in data Layer ,
Is this field's scope is till the session or it stay forever in data Layer until we remove that field?
Views
Replies
Total Likes
since this is not "my" data layer, I can obviously only influence this value on the current page.
But your own data layer would behave in the same way. Data layers describe the current page and every page may have a completely different context than the previous one.
Obviously, you can persist data between page views e.g., if you wanted to store the previous page name in session storage to track it on the next page.
This very much depends on your tracking needs.
The digitalData object represents the minimum set of information that has been agreed upon between you and the developers of the website.
But you are free to use additional information that freely accessible on the website through the Data Elements of your tag manager.
For instance, the page's title does not necessarily have to be present in the digitalData if it identical to the document.title HTML attribute.
Hi @bjoern__koth ,
Thanks for knowledge sharing.
Let me know if you have more questions on the matter.
@Rishank_Tyagi Can we consider this thread closed then?
Views
Replies
Total Likes
Hi @bjoern__koth , you can close this thread
Thanks
Views
Replies
Total Likes
@Rishank_Tyagi that you will have to do yourself. Mark which ever answer you think is correct ☺️