You could consider the following:
- Add a SetVar to the shape that opens your element, along with the NewCardVariable option.
- In the Visual overview of the shape you're opening, add the Execute page data and use it to execute a script that passes the session variable. Use ExecuteSetsOnInit if the script doesn't seem to execute otherwise.
- Create a script that takes in a parameter and set the parameter of your choice to the value that is passed.