Querying custom event data

Release 1.3 - ...

This example shows how to get the custom event data stored in SmiServer. If you have stored information in Smi with the viper

Smartsite SXML CopyCode image Copy Code
{smi.store("Documentation", "Searched for", $searchterms)}

, this is the macro that is used to obtain the data about the custom event.

XML CopyCode image Copy Code
<se:smidata
    sitename="mysite"
    report="category:documentation\searched for"
    from="{datetime.getdate(2010, 1, 1)}"
    until="{datetime.getdate(2011, 1, 1)}"
    channel="*"
    scopetype="all"
    scope=""
    save="data"
    resulttype="datatable"
/>
{datatable.simpleformat($data)}

 

The parameter Report has the value "category:documentation\searched for" which generates a sql statement that retrieves exactly the information stored by the event.