This chapter will explain how to install and configure eZ odoscope.
Before starting be sure to check the requirements page.
Follow the steps below in order to install eZ odoscope:
ezphttprequestinto the "extension" folder
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:
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
- 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:
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.
- 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
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!
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:
Configuring eZ odoscope
For eZ odoscope to access your server data some configurations will be required. Please find the settings on your
There are two switches for identifying objects within eZ Publish:
|Value 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.|
|Value 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 block you can find the following setting:
|Expects a string, representing the path to your server's web access log file.|
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.
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:
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.
updatelog cronjob can also be executed using an extra argument:
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,
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.