IntegrationsFinteza SDKPHP web serversProxying requests

Proxying requests

One of SDK objectives is to proxy requests to Finteza via your website. For details on SDK, please visit the "Proxying the script and requests" section.

Create a separate directory on the server, for example /fz and place a new file index.php with the following contents in it:

// import
include"{SDK_PATH}/finteza-analytics.php" );
 
// proxying
FintezaAnalytics::proxy( array(
    "url" => "https://content.mql5.com",
    "path" => "/fz",
    "token" => "lopvkgcafvwoprrxlopvkgcafvwfzsrx"
) );

Specify the appropriate path in {SDK_PATH} depending on where the SDK file is located.

Set the following parameters for the FintezaAnalytics::proxy function:

Parameter

Type

Description

url

string

Finteza server address. In most cases, it should not be changed.

path *

string

Beginning of the path for requests to be proxied. It should match the directory SDK files are located in (here it is /fz; if this path is already occupied, use another one).

 

Below are the necessary changes to the tracking code, so that all requests to Finteza are executed along the paths with the specified beginning.

token *

string

Token for signing the X-Forwarded-For header. You can get this value in the website settings of the Finteza panel: go to the "Counter" section, enable "Proxying script and requests" and copy the value from the "Proxy token" field.

 

When proxying, all requests to Finteza are physically sent from your website's server rather than directly from clients. In order to pass real IP addresses of clients (and not just the site address) to Finteza, SDK

uses the X-Forwarded-For header.

 

In order to prevent traffic inflation by spoofing requests and provide only real data on website visits, Finteza checks a header signature in requests. If a header is signed by the unique website token, the system trusts its values. Otherwise, the traffic is considered "inflated" (traffic reports are available in the Quality website section of the Finteza panel).

* – required parameters.

To redirect all requests having the /fz/* path to the /fz/index.php file that will perform proxying, add the following string to the .htaccess configuration file (if you use Apache as a web server):

RewriteRule ^fz/([^/]*)$ "fz/index.php" [QSA,L]

Note: Change the tracking code after configuring proxying.


You are losing analytical data without Finteza

Unlike free analytical systems, Finteza registers 100% visitor data on your website.

Sign up now and get a 30-day free access.

By registering you agree to the Service Agreement terms
Congratulations! Your account has been created
  • Visit
    finteza.com
  • Create
    account
  • Confirm
    email
  • Install
    code

We have sent an email to {email}. Please find it and activate your account.

After that you simply need to log in and install the tracking code to your site. It is easy: