Implement Tracking

Enable ‘Click’-events

After installing the ezrecommendation extension, the global pagelayout.tpl is overridden to track events automatically.

If you have customized your global pagelayout.tpl, you can do these changes manually, following the steps below:

The first step is to include the following code in your pagelayout.tpl. The code must be included in the body of the pagelayout.tpl but outside of any caching block. You can place it e.g. right before the </body> tag:

{* enable tracking of click events in pagelayout.tpl *}
{include uri='design:content/ezrecommendation_html.tpl'
 content=$module_result track=true()}

After this step you will see that ´click´-events will be created for any node that is marked as recommendable through the class definition. In our case all content of the classes ´Article for recommendation´, ´Product for recommendation´ and ´Image for recommendation´.

´Click´-events are created in the moment you click on the link to a recommendable object.

You can verify whether an event has been created by checking the ´debug.log´ in the directory ´<eZ publish root directory>/var/log´. You will find entries like the following for each tracking event being sent to the eZ recommender engine depending on the event chosen:

[ Sep 11 2011 14:17:52 ] event.yoochoose.net/news/<strong><CustomerID></strong>/click/
 131574345055084112/2/110?categorypath=%2F2%2F107%2F110

If you change from track=true() to track=false() in the above include you will obviously disable tracking for any page.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2013 eZ Systems AS (except where otherwise noted). All rights reserved.