vtoshach Posted May 19, 2014 Report Posted May 19, 2014 Hi I need help with my JS code. I need to be able to pass a random session ID to the URL link for a banner. The site sets it when users login. I need my code to remember it when a user clicks on the banner. The hidden value on the page is name="SESSIONTAB". I would like to add it to the invocation JS code. Quote
andrewatfornax Posted May 22, 2014 Report Posted May 22, 2014 So, just so I understand - you want the URL that users will be directed to, which will be off your site, to include a parameter that is not known to Revive Adserver? i.e.: User logs into your site and gets a session ID. User clicks on a banner. User is sent to remote site using URL www.example.com?session=ID Is that right? If so, I think the only way to do that is to have your site modify the JS invocation code before that code is output to the user's browser. I don't think there is any way to do this natively with Revive Adserver. Quote
vtoshach Posted May 22, 2014 Author Report Posted May 22, 2014 Yes. But its called Sessiontab=XX with XX not known until user logs in So how would I add that to the invocation code? Quote
andrewatfornax Posted June 2, 2014 Report Posted June 2, 2014 As I said: I think the only way to do that is to have your site modify the JS invocation code before that code is output to the user's browser. Quote
vtoshach Posted June 3, 2014 Author Report Posted June 3, 2014 Solved. In case anyone else needs this: I needed to append the URL with a session id. Mine is actually called Sessiontab. Where the zone is defined in the JS code, I added this to it: &sessiontab=" + document.querySelector('[name=SESSIONTAB]').value); So this is what it would look like: document.write ("?zoneid=6&sessiontab=" + document.querySelector('[name=SESSIONTAB]').value); On the adserver where I enter the information for the banner, I needed to add a variable to the URL. It looks like this: &sessiontab={sessiontab} I used ampersand, because I already used a ? in the string. andrewatfornax 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.