Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Desktop Screen Wdth Based Targeting

LordOfTheRings
Level 7
Level 7

Hi Team,

 

I am trying to target users based on screenWidth >1023 px. 

 

I am using Custom --> target-globa-mbox --> screenWidth --> greater then 1023 But I am not qualifying for this audience

I tried using profile script as:

if(mbox.name=="target-global-mbox")
{
var sW= mbox.param('browserWidth');
return sW;
}

 

But trace showing me as blank :

LordOfTheRings_0-1590559212546.png

 

I worked with screenOrientation in mid Jan 2020 and that was working for me. But now even screenOrientation is not working for me . Can anybody advise if something has changed ?


Thank you.

 

1 Accepted Solution
LordOfTheRings
Correct answer by
Level 7
Level 7

Got to know from help doc that screenWidth is not currently supported for audience creation when using at.js 2.x .

View solution in original post

2 Replies
LordOfTheRings
Correct answer by
Level 7
Level 7

Got to know from help doc that screenWidth is not currently supported for audience creation when using at.js 2.x .

View solution in original post

skand
Employee
Employee

Hi @LordOfTheRings 

Until this feature is available in 2.x , there is a workaround you can try as

“pass a custom parameter named “browserWidth” set to document.body.offsetWidth”  and then create an audience based on this parameter.

 

Regards,

Skand