Navigation
eZ Documentation Center
 

Skip to end of metadata
Go to start of metadata

This chapter will explain how to install and configure eZ odoscope.

Before starting be sure to check the requirements page.

Installation

Follow the steps below in order to install eZ odoscope:

 

  1. Copy ezodoscope and ezphttprequest into the "extension" folder

  2. Activate ezodoscope: In the administration interface, click "Setup" tab from the top menu, got to the "Extensions" section from the menu on the left, select "ezodoscope" from the extensions list, and click the "Update" button, or in settings/override/site.ini.append.php, add activation configuration under the "ExtensionSettings" section:

    [ExtensionSettings]
    ActiveExtensions[]=ezodoscope



  3. Regenerate autoloads: In the administration interface, click "Setup" from the top menu, go to the "Extensions" section from the menu on the left, make sure that the "ezodoscope" extension is selected, then click the "Regenerate autoload arrays for extensions" button, or in eZ Publish installation folder, run the following

    php bin/php/ezpgenerateautoloads.php -e



  4. Import DB schema: Add a table in the database used by your eZ Publish instance. You can do so as follows ( from eZ Publish's root directory ), in the case you are using MySQL:
    $ mysql -u <user> -p <database_name> < extension/ezodoscope/sql/mysql/schema.sql


    The procedure is very similar in case you are using another RDMS. You may want to have a look at the sql/oracle and sql/postgresql for Oracle and PostgreSQL databases respectively. Please refer to the documentation reference for your DBMS if you are experiencing issues.

  5. Import "Multivariate Test Container" content class: Login into the eZ Publish administration interface and navigate to the Setup tab.
    On the left hand side menu click on "Packages" label. From the "Packages" view click on the "Import new package" button and proceed with an import wizard instructions.
    eZ Publish package with content class definition is located in ezodoscope/packages/multivariate_test_container.ezpkg

  6. Clear cache: Clear INI and template caches (from admin "Setup" tab or command line).
     

Activating eZ odoscope

In order to let the odoscope webserver accept your eZ installation as client for log files you need to activate your extension first.

You can do it as follows:
 
1. Go to the odoscope tab in the eZ Publish administration interface.
 
2. Type in a name for your site. This is just for you to identify this instance in the eZ Services Network interface.
 
3. Type in your eZ installation key, which should belong to this installation.

    You can get the installation key within your eZ Services Network account, as follows:

  • Go to support.ez.no and log in with your Customer credentials;
  • Select the portal to which you want the Installation Key for (in case you have more than one portal available);
  • Click on "Maintenance and Support Agreement Details":

Asking for Activation Key

  • Copy the installation key provided and paste it in the required field

Asking for Activation Key

 
4. Press activate.
 
5. Your eZ Publish installation is now activated for odoscope.

 

Integrating the Tracking Pixel

In order to integrate the tracking pixel you need to place the following code within your pagelayout.tpl.

Be sure not to place it inside a cache-block!

pagelayout.tpl

Note: When using multiple independent front-end servers, the best practice in a multi server environment is to set up the load balancer in the way that it forwards the request to the odoscope pixel always to a single web server, so there is no need to merge different log files.

Integration on 5.0+ release using legacy fallback

For use on eZ Publish 5.0 and higher when Symfony stack is used (twig templates), then this tracking needs to be done also (or if you are not using legacy stack, .tpl files, at all) in your twig pagelayout using legacy code (also see legacy template fallback).

This is accomplished by putting the example above inside a for instance in my/odoscope_tracking_call.tpl file in legacy stack, and include it like in the following example:

pagelayout.html.twig


Configuring eZ odoscope

For eZ odoscope to access your server data some configurations will be required. Please find the settings on your extension/ezodoscope/settings/odoscope.ini.append.php file.

[ParamSettings]

There are two switches for identifying objects within eZ Publish:

SettingDescription
appendSiteAccessValue can be 0 or 1. The default value is 1. This means that independent statistics will be created by default for all your siteaccesses which are being accessed.
appendLanguageValue can be 0 or 1. The default value is 0. This means the language(s) being used by your siteaccesses won't be considered by default. Otherwise, if you set it to 1, independent statistics will be created by default for all your siteaccess' languages in use.

As odoscope uses the node id in order to identify single webpages, it may be important to differentiate these pages for languages and / or site accesses as well.

Therefore, one can set these two switches to "1".

[AccessLogSettings]

In the AccessLogSettings block you can find the following setting:

SettingDescription
PathExpects a string, representing the path to your server's web access log file.

The Path setting identifies the absolute path to the web access log file (including the filename), which is necessary for extracting the tracking pixel information and upload it to the odoscope web service.

Example:

[AccessLogSettings]
Path=/var/log/apache2/access.log

 

Setting up the cronjob

In order to extract the tracking pixel information and upload it to the odoscope web service, you need to run the upload cronjob:

php runcronjobs.php updatelog

Note: This command has to be executed in the root folder of your eZ publish installation.

 

Cronjob on multi-server environments

No additional configurations in eZ Publish or odoscope are required for multi-server environments, just this cronjob execution.

The updatelog cronjob can also be executed using an extra argument:

php runcronjobs.php updatelog ServerName1
php runcronjobs.php updatelog ServerName2

The second argument, represented by ServerName1 in the example above, will be used as the server identifier, allowing you to store information for each of your servers.
According to the example above independent statistics will be stored for the two servers, in this case, ServerName1 and ServerName2.

Repeat the cronjob execution on all the servers where you installed eZ odoscope, adding it to each server's crontab.

Important: Make sure that the values specified as second argument are unique for each server, in order to avoid data overwriting.

 

Report Data Calculation

Data uploaded using the updatelog Cronjob are analyzed once every night. Therefore, the reports available on eZ odoscope will not be updated right after you have run it.



  • No labels