SDKsJavaScript

Visitor Attributes

Share anonymous visitor signals like age range, gender, and income bracket so Koah can serve more relevant ads.

Set visitor attributes through the JavaScript API below. See Visitor Attributes for what they are, the privacy posture, the value lists, persistence, and when to clear.

Age range

Set visitor age as an exact value, a custom span, or a predefined bucket—use whichever fits your data and privacy needs. See Age range buckets in the reference for the full list of predefined buckets.

// Pick the bucket closest to the visitor's age
window.koah.setAgeRange('25-29')

Clearing the stored attribute

Pass 'unknown' to clear a previously set age range:

window.koah.setAgeRange('unknown')

Gender

Pass 'male' or 'female'. See Gender values in the reference.

window.koah.setGender('female')

Clearing the stored attribute

window.koah.setGender('unknown')

Income bracket

Pass a bracket string for annual household income in thousands of USD. See Income brackets in the reference for the full list.

window.koah.setIncomeBracket('50-100')

Clearing the stored attribute

window.koah.setIncomeBracket('unknown')

See Visitor Attributes for when to clear and how values persist across page loads.

Was this helpful?