English browser language audience set up | Community
Skip to main content
Level 2
December 12, 2021
Solved

English browser language audience set up

  • December 12, 2021
  • 1 reply
  • 1112 views

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? 

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 ryanr7

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.

 

1 reply

ryanr7Adobe EmployeeAccepted solution
Adobe Employee
December 15, 2021

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.

 

ambikaTewari_ATCI
Community Advisor
Community Advisor
October 19, 2022

Hi @ryanr7  I am getting "0" as the profile script value. does it mean this accept-language is not present in the user header?