Expand my Community achievements bar.

Applications for the 2024 Adobe Target Community Mentorship Program are open! Click to the right to learn more about participating as either an Aspirant, to professionally level up with a new Certification, or as a Mentor, to share your Adobe Target expertise and inspire through your leadership! Submit your application today.
SOLVED

Create audience from page parameter, recreate browserWidth

Avatar

Level 2

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. 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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.

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

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.

Avatar

Community Advisor

When I say image request I mean pass the data element value in the rule "Add Params to Page Load Request" like this :

LordOfTheRings_0-1599455842591.png