내 커뮤니티 업적 표시줄을 확대합니다.

Submissions are now open for the 2026 Adobe Experience Maker Awards
해결됨

Regarding Local Storage in Adobe Target and Launch

Avatar

Level 1

Urgent Help Needed

Hi Guys,

 

We need to access the data from local storage for creating audiences.

We have tried using custom code as well using local storage option in Data element so that we can access and create the audience in Adobe Target, but we're not able to achieve.

Please find screenshot and code for your reference.

user8723_0-1708950379903.png

 

// Example code to extract audiences from the JSON
try {
var jsonData = JSON.parse(localStorage.getItem('tealium_va')); // Replace 'yourLocalStorageKey' with the actual key used to store the JSON in local storage
if (jsonData && jsonData.audiences) {
jsonData.audiences; // This is the correct way to use the value in Adobe Launch data element code
} else {
console.log('Audiences data not found');
}
} catch (error) {
console.error('Error extracting audiences:', error);
}

 

Audience creation in Adobe Target:

user8723_1-1708950459123.png

Please help me out.

 

주제

토픽은 커뮤니티 콘텐츠를 분류하여 관련성 있는 콘텐츠를 찾는 데 도움이 됩니다.

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Level 3

There are a few different ways you could do this. Hard to say without knowing your full implementation.
https://experienceleague.adobe.com/docs/target-dev/developer/implementation/methods/methods-to-get-d...

One option that I'm personally familiar with is the Adobe Target v2 extension.

 

You can create 2 separate rule actions to Add Params to Page Load Request followed by Fire Page Load Request.

https://experienceleague.adobe.com/docs/experience-platform/tags/extensions/client/target-v2/overvie...

https://experienceleague.adobe.com/docs/experience-platform/tags/extensions/client/target-v2/overvie...


In the Add Params to Page Load Request action you can add a parameter which references a data element to fetch the data from localStorage.

You should then be able to reference that parameter in an Adobe Target audience under Custom.

 

For the parameter dropdown you'd select the name of the parameter that you chose in the Add Params to Page Load Request action.

 

I don't have any experience with the other methods so hopefully somebody more experienced can chime in.

Best of luck!

원본 게시물의 솔루션 보기

2 답변 개

Avatar

정확한 답변 작성자:
Level 3

There are a few different ways you could do this. Hard to say without knowing your full implementation.
https://experienceleague.adobe.com/docs/target-dev/developer/implementation/methods/methods-to-get-d...

One option that I'm personally familiar with is the Adobe Target v2 extension.

 

You can create 2 separate rule actions to Add Params to Page Load Request followed by Fire Page Load Request.

https://experienceleague.adobe.com/docs/experience-platform/tags/extensions/client/target-v2/overvie...

https://experienceleague.adobe.com/docs/experience-platform/tags/extensions/client/target-v2/overvie...


In the Add Params to Page Load Request action you can add a parameter which references a data element to fetch the data from localStorage.

You should then be able to reference that parameter in an Adobe Target audience under Custom.

 

For the parameter dropdown you'd select the name of the parameter that you chose in the Add Params to Page Load Request action.

 

I don't have any experience with the other methods so hopefully somebody more experienced can chime in.

Best of luck!

I'm guessing that if you were to use the following:

https://experienceleague.adobe.com/docs/target-dev/developer/client-side/at-js-implementation/functi...

 

That it's probably what the Adobe Target v2 extension is doing under the hood.