Create audience from page parameter, recreate browserWidth | Community
Skip to main content
New Participant
September 1, 2020
Solved

Create audience from page parameter, recreate browserWidth

  • September 1, 2020
  • 1 reply
  • 1601 views

Hi 

 

After upgrading Adobe Target to version 2.3 we no longer have access to 'browserWidth' which we used to create an audience. So i read that i had to setup a page parameter in Adobe Launch, where i passed 'window.innerWidth' to Target. In the debugger extension i can see that under the "execute" parameter the value is {"pageLoad":{"parameters":{"windowInnerWidth":"window.innerWidth"}}}. In Target i tried to create an audience where i used this parameter, but it does not seem to work. Any pointers would be helpful. 

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 ambikaTewari_ATCI

hi @jenk 

1. Create data element  (type=custom code) and return value as return document.body.offsetWidth ;

2. use this data element to pass in target image request

OR

1. USe custom code as:

window.targetPageParamsAll = function()
{
var newVal ="";
var browserWidth=document.body.offsetWidth;


newVal = newVal+"&browserWidth=" +browserWidth;
return newVal;
}

3. You should get the param in target image request.

 

Please try this and let me know how it goes for you.

1 reply

ambikaTewari_ATCI
ambikaTewari_ATCIAccepted solution
New Participant
September 3, 2020

hi @jenk 

1. Create data element  (type=custom code) and return value as return document.body.offsetWidth ;

2. use this data element to pass in target image request

OR

1. USe custom code as:

window.targetPageParamsAll = function()
{
var newVal ="";
var browserWidth=document.body.offsetWidth;


newVal = newVal+"&browserWidth=" +browserWidth;
return newVal;
}

3. You should get the param in target image request.

 

Please try this and let me know how it goes for you.

jenkAuthor
New Participant
September 4, 2020
where do i find this image request?