Share via


RecordEvent

Use this component to record event delta counts for the selected content items (the winners) in the Performance dictionary.

Although this component appears as RecordEvent in the Pipeline Editor, its ProgID is Commerce.CSFRecordEvent.

Intended use: Content Selection or Event Processing pipeline, Record stage; Order Processing pipeline, Receipt stage.

Configuration Values

None.

Values Read

The RecordEvent component reads the following values from the indicated dictionaries.

Key Dictionary Description
_event Order A string containing the name of the event to record.
_eventcount Order Optional. A SimpleList object containing the number of events to record for each winning content item. It must contain the same number of elements as the _winners list.

One event is recorded for each winning item if this key is not present.

_winnerindexes Order A SimpleList object containing the ContentList object indexes of the winning content items.

If this key is present, the _winners key should not be present. If both are present, only this key is used.

_winners Order A SimpleList object containing values from the item_id keys of the selected (winning) content items.

If this key is present, the _winnerindexes key should not be present. If both are present, only the _winnerindexes key is used.

_performance Order Specifically, the previous event delta count for the various content items.
_content.item_id Order The item_id key for the various content items contained in the ContentList referenced by _content.

If the _content key is present, the referenced ContentList object must have a column nameditem_id.

Values Written

The RecordEvent component writes the following values to the Order dictionary.

Key Description
_performance The Performance dictionary. This key will contain the new event delta counts for the various content items.
_content.invalid_nod A Boolean flag for each item in the ContentList object. Set this key to True if the item needs to have the Need of Delivery (NOD) re-calculated.

Remarks

The following are the names of the pre-defined events for campaigns:

  • REQUEST. A content request event.

  • CLICK. A click event for an ad or a promotion.

  • DOWNLOAD. A download of a GIF image or other advertising asset from the Web server.

  • SOLD. An item sold event, such as for a promotion or bounty ad.

You can record custom events by adding custom event names to the event_type table in your campaigns database.

This component flags whether or not the NOD values of the winning content items need to be re-calculated. The flag is set to True if the Item dictionary has a NOD key and if the event name matches the type of event the item is scheduled by.

The NOD values can be recomputed in the absence of a ContentList object (when the _Content key is not present) if the _winners key is passed instead of the _winnerindexes key.

The Performance dictionary contains a subdictionary for each content item for which an event has occurred, keyed by the item_id key. Each subdictionary maps event names to a count of the number of new occurrences of that event. Periodically, the total in the database for each event for each content item will be incremented by this amount. The RecordEvent component is responsible for creating keys in these dictionaries as needed and incrementing the corresponding values. The WriteEvents cache component is responsible for recording the increments in the running totals in the database.


All rights reserved.