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.
Solved! Go to Solution.
Views
Replies
Total Likes
@chischa - Of course.
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.
Views
Replies
Total Likes
@chischa - Of course.
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.
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
@chischa - The problem is that the "Session" storage duration for a data element uses sessionStorage, which is hostname- (subdomain) specific. Here's one possible way to deal with it:
https://gist.github.com/hitGovernor/cecf482ffb3e36c514c7ffddf957007d
In short, you'll need to create TWO separate data elements:
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).
Good luck!
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Like
Replies
Views
Likes
Replies