Pulling Values from Data Layer using Adobe Launch

eham06

17-05-2018

I have a data layer titled "Bootstrapper._data_layer".  See screenshot from Chrome console below...

My development team created this data layer and they are pushing data to it.

I want to use Adobe Launch to pull values from this data layer.

How would I configure Adobe Launch to pull values (such as page_name) from this data layer?

How would I configure Adobe Launch to push new values to this data layer?

1489390_pastedImage_0.png

Accepted Solutions (1)

Accepted Solutions (1)

StewSchilling

MVP

18-05-2018

I don't disagree with the guidance of using the AEM context hub extension, but I wonder if it's more trouble than it's worth in your case.

Since your data appears to be pretty flat, you _could_ just create a Launch data element for each value that you care to access.

To do this, you'd :

1) choose "New Data Element",

2) use the Core extension and

3) select the "Javascript Variable" as the data element type.

4) Then you'd enter "Bootstrapper._data_layer.page_name" (no quotes) for the value and

5) set the name to something like "page_name".

Do this for as many data layer values that you need to reference from within rules.

Answers (6)

Answers (6)

thomas_amsler

18-05-2018

Sorry, I didn't find any videos. But honestly it isn't that complicated:

The only thing you need to check with your developers is that they provide you with a JSON Schema of the datalayer they created.

In the ContextHub configuration you have only a radio button on the top whereas the first is the option for the AEM and the second is what you need, a custom datalayer (sorry I am not able to post screenshots here for some reasons).

If you select this "Customized ContextHub Data Layer" option you are provided with a text input field where you would add "Bootstrapper._data_layer" as this is the root of your custom datalayer. Next to this field is the "</> Open Editor" Button. If you click this, you get popup window where you add the JSON Schema mentioned above.

After that you can use it exactly the same way as the AEM datalayer and you'll probably find videos on how to define data elements with the context hub extension.

eham06

18-05-2018

Thanks for the info... I am looking for tutorials on ContextHub.  All of the ContextHub videos that I found assume that the user is using AEM.  We are not using AEM.  Do you know of any tutorial videos that speak specifically to ContextHub without a dependency on AEM?

thomas_amsler

18-05-2018

I think the easiest way for you ist to install the ContextHub extension and configure your custom datalayer javascript object. There you can provide a JSON Schema of your object and then you can access it in your data elements. Check the tutorial videos on how to to this.

For pushing stuff into it, you probably need custom script elemnts in Launch.