Skip to main content
Winston_2022
Level 2
Apr 4, 2023 6:43 AM UTC
Solved

Set Session Storage Values - Adobe Data Collection

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? 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
yuhuisg
yuhuisgAccepted solution
Community Advisor
Apr 5, 2023 6:12 AM UTC

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".

2 replies

yuhuisg
Community Advisor
yuhuisgCommunity AdvisorAccepted solution
Community Advisor
Apr 5, 2023 6:12 AM UTC

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".
Translate
Winston_2022
Level 2
Apr 5, 2023 7:26 AM UTC

Thank you for the response.

I figured it out after posting this question.

It works when followed the suggested steps.

 

Translate