DTM data layer | Community
Skip to main content
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Feike_Visser1
Feike_Visser1Accepted solution
Employee
October 16, 2015

In your page template you can just add a code-snippet like

<script>

var digitalData={... your datalayer };

</script>

This way DTM can access it.

4 replies

smacdonald2008
Level 10
October 16, 2015

Here is the official AEM docs on this subject:

http://docs.adobe.com/docs/en/aem/6-0/administer/integration/marketing-cloud/dtm.html

I will search to see if there are other pieces of content on this use case. 

Translate
aem_visiAuthor
Level 3
October 16, 2015

Thanks for the reply

We are currently on an older version, CQ.5.5 . The aim is to 'somehow' populate the data layer, so the information populated are passed on to DTM

What i need to find out is how i populate the data layer object and also how  do we send custom events to DTM

Previously with direct sytecat  integration we would fire event tracking by using adv.trackEvent from s_code. How can we 

1) Populate and send data layer to DTM

2) Fire event tracking i.e. similar to sytecat adv.trackEvent

Translate
Feike_Visser1
Feike_Visser1Accepted solution
Employee
October 16, 2015

In your page template you can just add a code-snippet like

<script>

var digitalData={... your datalayer };

</script>

This way DTM can access it.

Translate
aem_visiAuthor
Level 3
October 16, 2015

Great! Data Layer is clear

Regarding custom events such as lets say click of one of the social links. Do we implement something like ?

Code generate by component

<a href=”http://facebook.com” onclick=”trackClickInteraction();”>Social Link</a>

create a JS external file which is included in each page

this.trackClickInteraction = function() {

..........

s.tl(....);

}

Does the above seem like a reasonable solution? Do we need to include onClick event  and s.tl call, or DTM uses a different mechanism to capture custom events?

Translate