Expand my Community achievements bar.

SOLVED

How to capture data from component state through events using adobe client data layer in adobe launch?

Avatar

Level 2

We have implemented default adobe client data layer and trying to capture click events. Currently we are able to capture only eventinfo like path..etc.

I can see we can capture component data using the path from event info by getting the component full state.

Can anyone suggest how to capture component data by getting full state through events in adobe launch?

1 Accepted Solution

Avatar

Correct answer by
Level 2

This article have the solution I am looking for and I implemented it successfully- Able to capture the component data via events.

https://experienceleague.adobe.com/docs/experience-manager-learn/sites/integrations/analytics/track-...

View solution in original post

4 Replies

Avatar

Community Advisor

I assume that you're referring to the method described at https://experienceleague.adobe.com/docs/experience-manager-learn/sites/integrations/adobe-client-dat...

Prepare to write custom code, because that is what you need to do to get the data out from that AEM integration. See the "Working with Events" section in that page to see what you need to do.

If you don't like this approach (disclaimer: I don't!), then don't use the AEM integration at all. Instead, work with your developers to push whatever information you need into ACDL based on the user's action. It'll be more work for your developers, but the end result is that you should be able to get your data directly using the ACDL data element type "Get Computed State", which allows you to avoid using custom code.

Avatar

Level 2

@yuhuisg Thanks for your response. Based on the document you provided, I got the point till printing the output in console. Do you know how can we get this output in launch?

 

Like how can we capture the dataObject in Launch that is printed in console? (want to capture this dataObject values in evars using Launch via events)

Avatar

Community Advisor

Assuming that your ACDL structure is like the one that is used in the example at that documentation, then the following might work, e.g. with the pageShownHandler() function (note: I haven't tested any of this myself!)

function pageShownHandler(event) {
    var dataObject = getDataObjectHelper(event, {"@type": "wknd/components/page"});
    if(dataObject != null) {
        s.eVarXX = dataObject['dc:title'];  // set the eVar with the "dc:title" value
    }
}

Avatar

Correct answer by
Level 2

This article have the solution I am looking for and I implemented it successfully- Able to capture the component data via events.

https://experienceleague.adobe.com/docs/experience-manager-learn/sites/integrations/analytics/track-...