Expand my Community achievements bar.

Join us for the Adobe Journey Optimizer Community Q&A Coffee Break on 28th February at 8 am PT with Ariel Sultan, Daniel Wright, Josee Haeley and Rohit Basuri.
SOLVED

Set Session Storage Values - Adobe Data Collection

Avatar

Level 2

Hi,

I'm trying to store form field values to session storage and access them on the thank you page, when form is submitted.

I tried the attached code in Data Elements. But it's not working as expected. Meaning the values do not appear to be in session storage when i check on thank you page.

Any suggestions on how best to do it? 

Edit-Data-Element-Data-Collection-Tags-Adobe-Experience-Platform-Data-Collection.png

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Data elements are meant for reading/returning values, so you shouldn't be manipulating your session storage values in a data element. Manipulation should be done in Rule actions instead.

  1. Move your code's lines 10-11 into a custom code action inside a relevant Rule.
  2. Change your data element to Core > Session Storage, and specify your sessionStorage key "dc_fname".

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

Data elements are meant for reading/returning values, so you shouldn't be manipulating your session storage values in a data element. Manipulation should be done in Rule actions instead.

  1. Move your code's lines 10-11 into a custom code action inside a relevant Rule.
  2. Change your data element to Core > Session Storage, and specify your sessionStorage key "dc_fname".

Avatar

Level 2

Thank you for the response.

I figured it out after posting this question.

It works when followed the suggested steps.