Add crisp changes & auto triggers.
This commit is contained in:
@@ -58,6 +58,13 @@ export default class Home extends React.Component {
|
||||
}, 500);
|
||||
}
|
||||
/* 如果不是 dva 2.0 请删除 end */
|
||||
console.log("Setting $crisp segments", ["lead"]);
|
||||
window.$crisp.push(["set", "session:segments", [["lead"]]]);
|
||||
window.$crisp.push([
|
||||
"set",
|
||||
"session:event",
|
||||
[[["landing-page", {}, "green"]]],
|
||||
]);
|
||||
}
|
||||
|
||||
render() {
|
||||
|
||||
@@ -166,11 +166,14 @@ export function* signInSuccessSaga({ payload }) {
|
||||
LogRocket.identify(payload.email);
|
||||
try {
|
||||
// window.$crisp.push(["set", "user:email", [payload.email]]);
|
||||
console.log("$crisp set nickname", [payload.displayName || payload.email]);
|
||||
window.$crisp.push([
|
||||
"set",
|
||||
"user:nickname",
|
||||
[payload.displayName || payload.email],
|
||||
]);
|
||||
console.log("Setting $crisp segments", ["user"]);
|
||||
window.$crisp.push(["set", "session:segments", [["user"]]]);
|
||||
} catch (error) {
|
||||
console.log("Error updating Crisp settings.", error);
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import i18n from "i18next";
|
||||
import { initReactI18next } from "react-i18next";
|
||||
import LanguageDetector from "i18next-browser-languagedetector";
|
||||
import { initReactI18next } from "react-i18next";
|
||||
import en_Translation from "./en_us/common.json";
|
||||
import fr_Translation from "./fr/common.json";
|
||||
import es_Translation from "./es/common.json";
|
||||
import fr_Translation from "./fr/common.json";
|
||||
|
||||
// the translations
|
||||
// (tip move them in a JSON file and import them)
|
||||
@@ -23,9 +23,7 @@ i18n
|
||||
debug: process.env.NODE_ENV === "production" ? false : true,
|
||||
|
||||
//keySeparator: false, // we do not use keys in form messages.welcome
|
||||
react: {
|
||||
wait: true,
|
||||
},
|
||||
|
||||
interpolation: {
|
||||
escapeValue: false, // react already safes from xss
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user