Events are entities which can be tracked to provide insights and additional functionalities. Some events are natively tracked by AccelaSearch (i.e. search intents) and do not need any intervention by merchants, others are automatically tracked when using the provided JavaScript layer but need to be re-implemented if using a custom interface, and some require additional tools or plugins such as Google Tag Manager.
To track events using Google Analytics you need to enable the feature in the AccelaSearch console. If your website already integrates Google Analytics via data layer, it is not necessary to add any type of code. Otherwise, by selecting the "gtag" item from the console, you can copy an import script to add to the code of your website.
Events can be tracked by issuing a POST
request to the AccelaSearch API system to the /API/shops/{id}/events
, provided id
is the universal identifier of the shop on which the event is taking place. Details about the API system can be found at https://svc11.accelasearch.net/API. The Content-Type
header must be set to application/json
, and the request body must be encoded accordingly. The following parameters must be sent along with the request:
{
"eid": "as_click_product",
"sid": "90vjkjfba4y78agdjsh",
"uid": "user_46",
"data": {"id": 1, "title": "Some product"}
}
Where eid
is an event code from the following table, sid
is the identifier of the session, uid
is the identifier of the user and data
is a dictionary of additional information which dependent on the type of the event and is exemplified in the following table: