Chore: Send browser language in webwidget events (#952)
Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
This commit is contained in:
parent
ed1c871633
commit
f9e8bb8e10
10 changed files with 47 additions and 30 deletions
|
@ -1,15 +1,8 @@
|
|||
import Vue from 'vue';
|
||||
import { buildSearchParamsWithLocale } from '../helpers/urlParamsHelper';
|
||||
|
||||
const sendMessage = content => {
|
||||
const locale = Vue.config.lang;
|
||||
const refererURL = window.refererURL || '';
|
||||
let search = window.location.search;
|
||||
if (search) {
|
||||
search = `${search}&locale=${locale}`;
|
||||
} else {
|
||||
search = `?locale=${locale}`;
|
||||
}
|
||||
|
||||
const search = buildSearchParamsWithLocale(window.location.search);
|
||||
return {
|
||||
url: `/api/v1/widget/messages${search}`,
|
||||
params: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue