Warning: Can't synchronize with the repository (Couldn't open Subversion repository /vol/svn/developer.metricly.com: SubversionException: ("Can't open file '/vol/svn/developer.metricly.com/format': Permission denied", 13)). Look in the Trac log for more information.

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 - 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.


  1. Download the latest archive here: DB Connector Archive
  2. Unzip the archive under your web server's directory root (you may choose to put it in a subfolder such as /metricly)
    1. If you are upgrading, make sure you preserve your config.php and metrics.xml files, and delete any existing .htaccess files
    2. Ensure the files have the correct permissions and owners so they are accessible and metrics.xml needs to be writeable by the web server
  3. You may choose to review and edit the config.php, but no edits should be required by default (see Config.php Documentation)
    1. 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)
    2. Make sure to set 'url_depth' if you don't install the DB connector at /metricly or just one level deep.
    3. 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.
  4. Log into Metricly.com and connect the Internal Database Connector with the URL to your endpoint and database connection settings.
    1. 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 ( can reach the DB connector.

Basic Security Model

By default, the database connector Security Models

Questions? Email us at support@….