Database Connector Documentation
Note: If you are upgrading an existing installation, do not overwrite your metrics.xml or config.php files
The Metricly Database Connector is a small and secure PHP application that connects your internal metrics data to Metricly.com. The Database Connector is installed on your own web server and must be accessible from Metricly.com (IP address 184.108.40.206) - preferably over a secure https connection.
The Database Connector requires PHP 5.2+, a supporting web server (such as Apache), and connects to a MySQL, PostgreSQL or SQL Server database (Windows only). The Database Connector also depends on PDO, a fairly standard database abstraction layer for PHP, and the appropriate PDO driver depending on your database type. MySQL and PostgreSQL drivers are often installed with PHP, but you may need to install them manually (look for packages php5-pgsql and php5-mysql). Windows SQL Server support requires the SQLSRV drivers available at http://msdn.microsoft.com/en-us/library/cc296170(SQL.90).aspx.
- Download the latest archive here: DB Connector Archive
- Unzip the archive under your web server's directory root (you may choose to put it in a subfolder such as /metricly)
- If you are upgrading, make sure you preserve your config.php and metrics.xml files, and delete any existing .htaccess files
- Ensure the files have the correct permissions and owners so they are accessible and metrics.xml needs to be writeable by the web server
- You may choose to review and edit the config.php, but no edits should be required by default (see Config.php Documentation)
- You can specify your database connection settings in the configuration file, or do this later when setting up the connection to Metricly.com (Step 4)
- Make sure to set 'url_depth' if you don't install the DB connector at /metricly or just one level deep.
- If you are going to use 'snapshot' metrics, ensure that the DB connector can write to the snapshot database defined in the config.php file.
- Log into Metricly.com and connect the Internal Database Connector with the URL to your endpoint and database connection settings.
- You can now edit the list of dimensions, metrics, and table links using the Database Connector's 'Configure' options through Metricly.com.
All metrics and dimensions can be created and configured through Metricly.com - but if you'd like to edit the metrics.xml file manually see the Metrics.xml Documentation.
Network Configuration and Security
The Database Connector is a drop-in application that provides a web service endpoint for Metricly to connect with your database. Your database doesn't need to be accessible via the web, but the DB Connector needs to run on a machine that 1) has access to the database, and 2) is publicly accessible from our Metricly.com servers. For a lot of our customers, the DB Connector is on the same machine as the database, but it can also run on a separate machine.
The default security model (Basic Security Model) relies on two security features - 1) the DB connector should run on an HTTPS web server to encrypt traffic between the DB Connector and Metricly.com (traffic is always encrypted between your desktop machine and Metricly.com), and 2) the DB connector has built in IP restrictions so it can only accept connections from our Metricy.com servers. This provides a solid security model for most environments.
If you are interested in a tighter security setup, we recommend the following (Enhanced Security Model). In addition to running on HTTPS and taking advantage of the DB Connector's built-in IP restrictions, you can setup a firewall restriction so that only connections from Metricly servers (220.127.116.11) can reach the DB connector.
Basic Security Model
Questions? Email us at support@….