FAQ Why Do My Statistics All Report From An Unknown/specific Country

From TMM Wiki
Revision as of 16:45, 2 April 2016 by Tmmben (talk | contribs) (Created page with "{{NATS4 Manual | show_sites_admin_section = true }} Q: Why do my statistics all report from an unknown/specific country? A: NATS relies on location identifying dependencies t...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
NATS 4
Members Admin
The Members Admin
View Member Details
Add Member
MySQL Auth
Mod Authn DB
Multisite Access
Member Logging
Member Password Retrieval
OpenID Connect
Mod Auth OpenIDC
ID Numbers
Sites Admin
The Sites Admin
Sites
Site Setup
Site Templates
Tour Setup
Join Options
No Cost Registration
Special Pricing Options
Join Option Rules
Post URL Usage
Post URLs in NATS4
Approval/Upgrade/Denial Variables
Approval/Upgrade/Denial Template Variables
Mobile Tours
Token Sites
ID Numbers
Site Partner
Site User Management
Example Postbacks for Site User Management
Configure Redirects
Split A-B Testing
Username Checking
Form Validation
Post-Biller Templates
Send Information To Special Biller
Join Option Box vs Button
Qualified Join Page Hits
Allowed languages
Customize Join Form
Package Plus
Token Plus
Signup Plus
Type-In Traffic
Coupon Codes
Setting Rules
Site Groups
Options Simulator
ATVOD Verification Process

Q: Why do my statistics all report from an unknown/specific country?

A: NATS relies on location identifying dependencies to provide location data. By default, NATS attempts to use MaxMind's GEOIP database. To resolve the unknown country issue, please ensure that the configured location dependency is providing the required data. For testing purposes, you can place the following script in the NATS/www directory:

<? echo 'IP: '.$_SERVER['REMOTE_ADDR'].': You are from '.apache_note("GEOIP_COUNTRY_NAME");?>

If all traffic is being recorded as initiating in the same country, you may be load balanced and not reporting the proper IP address to the server. Ensure that the reported IP address belongs to your server cluster, you need to expose the IP address and configured NATS via the NATS/includes/config.php file by adding the following: $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_X_FORWARDED_FOR']; The above example assumes that the original surfer IP address is sent in the HTTP header as X_FORWARDED_FOR.