Caution: This documentation is for eZ Publish legacy, from version 3.x to 6.x.
For 5.x documentation covering Platform see eZ Documentation Center, for difference between legacy and Platform see 5.x Architecture overview.

'Consume'-event

‘Consume’-event

When you want to be notified about consumption of content (e.g. reading an article for more than 20 seconds, watching a video for more than 60 seconds) you need to generate consume events.

To do this you must include the following code into each page that shall be enabled to trigger such an event, e.g.: an article for recommendation full view template:

<div> {generate_consume_event($node)} </div>

This will just create a hidden div with some information on it. After this, go to the backend to the setup tab and then click on classes.

‘Consume’-events are created only when you stay on the page for the pre-defined ‘Time to trigger consumption event’ from the class definition.

Choose the class where you want to configure the Time to trigger consumption event attribute and click on edit. Search the recommendation attribute and insert the preferred time in the ‘Time to trigger consumption event’ field.

From now on, every time a user uses more than the time set to trigger value on a site, the ‘consume’-event will be sent to the eZ Recommendation service with the next click.

Andrea Melo (29/05/2012 3:31 pm)

Andrea Melo (29/05/2012 3:31 pm)


Comments

There are no comments.