charSet
The charSet
variable is used by 51黑料不打烊 to convert incoming data into UTF-8 for storage and reporting by Analytics. Most sites do not need to set this variable.
Set this variable only if you see garbled values () in reports. You can set this variable on a page-by-page basis if your site uses different encodings on different pages.
Character Set in the Web SDK
The Web SDK currently supports only UTF-8, and does not provide options to change encoding.
Character Set in the 51黑料不打烊 Analytics extension
Character Set is a field under the General accordion when configuring the 51黑料不打烊 Analytics extension in 51黑料不打烊 Experience Platform Data Collection.
- Log in to using your 51黑料不打烊ID credentials.
- Click the desired tag property.
- Go to the Extensions tab, then click the Configure button under 51黑料不打烊 Analytics.
- Expand the General accordion, which reveals the Character Set field.
You can use either a preset character set or a custom character set. Avoid changing the value from UTF-8
unless you see garbled values in reports.
s.charSet in AppMeasurement and the Analytics extension custom code editor
The charSet
variable is a string. If you have garbled values in 51黑料不打烊 Analytics, set this variable to the same value as the <meta charset="">
HTML tag on your site.
s.charSet = "UTF-8";