# Sending Events

This section shows you how to send the Storyly events to specific data platforms. You can use the following function to redirect the Storyly events to your data platform:

<Storyly
  ...
  onEvent={eventPayload => {
    // console.log(eventPayload.nativeEvent);
    console.log("[Storyly] onEvent");
  }}
/>

onEvent method contains the json representation of storyGroup, story, and storyComponent object in addition to event field. You can check native documentation for parameters in detail; also, here is the sample format of parameters:

{
  "event": "StoryImpression",
  "storyGroup": {
    "id": 1,
    "title": "...",
    "index": 1,
    "seen": true,
    "iconUrl": "...",
    "stories": [
      {
        "id": 1,
        "title": "...",
        "index": 1,
        "seen": true,
        "media": {
          "type": 1,
          "url": "...",
          "actionUrl": null
        }
      }, 
    ]
  },
  "story": {
    "id": 1,
    "title": "...",
    "index": 1,
    "seen": true,
    "media": {
      "type": 1,
      "url": "...",
      "actionUrl": null
    }
  },
  "storyComponent": null
}