Whats the best way to collect user language

Highlighted

Whats the best way to collect user language

Hi Everyone! I work for an international company with a Marketo database with over 750,000 leads, of which none have a language selection. A field was never created for language. We have instead been sending out translated emails based on country.

My question is, what is the best way to go about collecting user language? Is there a way to collect logged in users language via their browser language settings and add that to a custom field? Or would it be best to send out an email asking customers what their preferred language is?

Any and all suggestions are welcome  Thanks!

5 REPLIES 5
Highlighted
Level 10 - Community Moderator

Re: Whats the best way to collect user language

You'll need to move the post to Products‌ to continue (please move it, don't just copy it).  Move link will be at the right. You've posted in About, which isn't a support space.

Highlighted
Level 10 - Community Moderator

Re: Whats the best way to collect user language

Great question & thanks for moving the thread.

Support for navigator.language is good across all modern browsers, so if you deem that trustworthy (at least as a starting point) it's easy to add it as a hidden form field.[1]

However, it's by no means foolproof. You must flag the value from the browser as being inferred (Inferred Language) and have another field, User Language that takes precedence if self-serviced by a lead or entered by an operator. As an example of how the browser value can go wrong, consider someone visiting your page from a business center kiosk or simply a device that hasn't been completely configured. You can't take a one-time setting as being correct, but you also can't continually overwrite their setting as they visit from different devices. Also, naturally bilingual people may be fine with their work browser being set to en-US (so it's "correct" in that sense) because of some other incompatibilities, IT policies, whatever, but they want your emails to be in es-MX.

Sending an email out asking people to set User Language could work -- or could seem like "We have no marketing copy this week, so please help us fill in our database" type of chaff. Depends on the individual lead. Worth testing with a small cohort.

And no matter what else you do, start including User Language on all your forms as a (visible) Progressive Profiling field ASAP.

[1] i.e.

MktoForms2.whenReady(function(form){
form.addHiddenFields({
Inferred_Language__c : navigator.language
});
});‍‍‍‍‍
Highlighted

Re: Whats the best way to collect user language

Hi Sanford, thanks for the reply. All of your suggestions seem to make the most sense for our situation. Adding a visible field to our registration for is in the works now, so for future customers we will have this important piece of information. 

In regards to the hidden field, is that something that has to be part of a visible form? Our goal would be to pick up our current customers inferred language in the background when they login to our website. In other words, there would not be an actual form, just a code the would run when they visit our site that pushes their inferred language into Marketo.

Highlighted
Level 10 - Community Moderator

Re: Whats the best way to collect user language

The hidden field will be added by the JS I put above. It doesn't even have to appear in the Form Editor. But you do need to use the right SOAP name for the field you create (in place of Inferred_Language__c).

Highlighted

Re: Whats the best way to collect user language

Okay, great! Thanks for your help!