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?
Solved! Go to Solution.
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.
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.
Hi @Ryan_Roberts_ I am getting "0" as the profile script value. does it mean this accept-language is not present in the user header?
Views
Replies
Total Likes
Views
Like
Replies
Views
Likes
Replies
Views
Like
Replies