If user clicks on our ad and QSP ?ex_id=123456 is appended to the URL of our landing page, is Launch able to store that QSP? I want to later retrieve that same QSP value from the landing page at the point of purchase, in the same browsing session, and insert that value in a parameter of a marketing tag.
Just create a new data element and set the "Storage Duration" option to "Session" (or whatever duration you need). When you're ready to add the value to your marketing tag, just reference the data element.
In short, you'll need to create TWO separate data elements:
The first data element pulls the value from the query parameter. For the sake of conversation, let's name it "qsp:ex_id" and set storage duration to "None"
The second data element uses custom code to reference the the "qsp:ex_id" data element, set a cookie on your root domain (.example.com), and return the query param value. For the sake of this conversation, name it "cookie:ex_id". Use the code from the above GitHub link for this data element.
This example sets the cookie for with session expiration, and should be accessible across subdomains.
Once both are created, make sure reference the "cookie:ex_id" data element on load of every page. If you don't, the code won't execute, and the cookie will not be created. (You don't have to use the information, but you have to execute the logic. In my testing, I just triggered a _satellite.getVar("cookie:ex_id") in a rule that fires on load of every page.)
To populate the parameter on your marketing tag, just use the "cookie:ex_id" data element and you should see the ?ex_id value.
It should go without saying, but this all assumes you're in the same session and that all pages are on the same root domain (.example.com).