chore: Add documentation for Maxmind geocoder setup (#1518)
This commit is contained in:
parent
0619894560
commit
ac7fdaa997
3 changed files with 45 additions and 0 deletions
|
@ -11,6 +11,7 @@
|
|||
"OS": "Operating System",
|
||||
"INITIATED_FROM": "Initiated from",
|
||||
"INITIATED_AT": "Initiated at",
|
||||
"IP_ADDRESS": "IP Address",
|
||||
"CONVERSATIONS": {
|
||||
"NO_RECORDS_FOUND": "There are no previous conversations associated to this contact.",
|
||||
"TITLE": "Previous Conversations"
|
||||
|
|
|
@ -11,6 +11,12 @@
|
|||
:value="location"
|
||||
icon="ion-map"
|
||||
/>
|
||||
<contact-details-item
|
||||
v-if="ipAddress"
|
||||
:title="$t('CONTACT_PANEL.IP_ADDRESS')"
|
||||
:value="ipAddress"
|
||||
icon="ion-android-locate"
|
||||
/>
|
||||
<contact-details-item
|
||||
v-if="browser.browser_name"
|
||||
:title="$t('CONTACT_PANEL.BROWSER')"
|
||||
|
@ -106,6 +112,12 @@ export default {
|
|||
return `${this.browser.browser_name || ''} ${this.browser
|
||||
.browser_version || ''}`;
|
||||
},
|
||||
ipAddress() {
|
||||
const {
|
||||
additional_attributes: { created_at_ip: createdAtIp },
|
||||
} = this.contact;
|
||||
return createdAtIp;
|
||||
},
|
||||
location() {
|
||||
const {
|
||||
additional_attributes: {
|
||||
|
|
32
docs/self-hosted/enable-ip-logging.md
Normal file
32
docs/self-hosted/enable-ip-logging.md
Normal file
|
@ -0,0 +1,32 @@
|
|||
---
|
||||
path: "/docs/self-hosted/enable-ip-logging"
|
||||
title: "Chatwoot Production deployment guide"
|
||||
---
|
||||
|
||||
Chatwoot allows you to identify the location of the user by geocoding the IP address. For IP Address geocoding, we support MaxmindDB services. This lookup provides methods for geocoding IP addresses without making a call to a remote API everytime. To setup your self-hosted instance with the geocoding, follow the steps below.
|
||||
|
||||
**Step 1:** Create an account at [MaxmindDB](https://www.maxmind.com) and create an API key.
|
||||
|
||||
**Step 2:** Add the following environment variables.
|
||||
|
||||
```bash
|
||||
IP_LOOKUP_SERVICE=geoip2
|
||||
IP_LOOKUP_API_KEY=your-api-key
|
||||
```
|
||||
|
||||
With this step, Chatwoot would automatically download the [MaxmindDB downloadable databases](https://dev.maxmind.com/geoip/geoip2/downloadable/) and cache it locally.
|
||||
|
||||
**Step 3:** Enable IP Lookup on your account.
|
||||
|
||||
Login to Rails console
|
||||
|
||||
```
|
||||
RAILS_ENV=production bundle exec rails console
|
||||
```
|
||||
|
||||
```rb
|
||||
account_id = 1 // Please fill your account id instead of 1
|
||||
account = Account.find(account_id)
|
||||
account.enable_features('ip_lookup')
|
||||
account.save!
|
||||
```
|
Loading…
Reference in a new issue