Set Session Storage Values - Adobe Data Collection | Community
Skip to main content
Winston_2022
Level 2
April 4, 2023
Solved

Set Session Storage Values - Adobe Data Collection

  • April 4, 2023
  • 1 reply
  • 1984 views

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.
Best answer by yuhuisg

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

1 reply

yuhuisg
Community Advisor
yuhuisgCommunity AdvisorAccepted solution
Community Advisor
April 5, 2023

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".
Winston_2022
Level 2
April 5, 2023

Thank you for the response.

I figured it out after posting this question.

It works when followed the suggested steps.