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

English browser language audience set up

Maple-Michelle1
Level 2
Level 2

our website is translated into 4 different languages (english, german, french, japanese). For the most part, we run our tests on english versions of the page and I have tried to create a audience with the specifications of browser > language > equals > english. When I did that the test came up with zero traffic. However If I set up the audience as browser > language > does not equal > French, German, Japanese

I recieve usual traffic. why is this happening? and why can't I set it up as equals english? 

1 Accepted Solution
ryanr701
Correct answer by
Employee
Employee

Hi @Maple-Michelle1

Perhaps you've solved this already. Normally the out of the box Browser > Language audience rule options should work fine. However, if you find them not working as expected you could use a profile script to define an audience. The profile script could check for the four languages you care about and return which one is most preferred. Something like this:

var brL = user.header('accept-language') || "0";
if (brL.search(/^ja|^en|^fr|^de/) > -1) {
	return brL.substring(0,2);
}

Then in your English audience rule use: Visitor Profile > Name-of-your-profile-script equals: en

Hope that helps.

 

View solution in original post

1 Reply
ryanr701
Correct answer by
Employee
Employee

Hi @Maple-Michelle1

Perhaps you've solved this already. Normally the out of the box Browser > Language audience rule options should work fine. However, if you find them not working as expected you could use a profile script to define an audience. The profile script could check for the four languages you care about and return which one is most preferred. Something like this:

var brL = user.header('accept-language') || "0";
if (brL.search(/^ja|^en|^fr|^de/) > -1) {
	return brL.substring(0,2);
}

Then in your English audience rule use: Visitor Profile > Name-of-your-profile-script equals: en

Hope that helps.

 

View solution in original post