Stories Widget Events
You can recieve widget interaction data by subscribing to Story Widget Events.
- iOS: use the
IASEvent.Story.storyWidgetEvent() - Android:
InAppStoryManager.getInstance().setStoryWidgetCallback() - JS:
inAppStoryManager.on("widgetEvent", (payload) => {});
The names of widget events and the data that they return are listed below.
w-link
Click on link/button in story's slide
| Key | Type | Description |
|---|---|---|
| story_id | Int | unique story ID |
| feed_id | Int? | ID of the feed the story was opened from. null if it's single |
| slide_index | Int | index of story's slide where callback was called |
| widget_id | String | unique widget ID |
| widget_label | String | button text |
| widget_value | String | button url |
w-quiz-answer
Click on any point in "quiz" widget
| Key | Type | Description |
|---|---|---|
| story_id | Int | unique story ID |
| feed_id | Int? | ID of the feed the story was opened from. null if it's single |
| slide_index | Int | index of story's slide where callback was called |
| widget_id | String | unique widget ID |
| widget_label | String | quiz question |
| widget_answer | Int | answer index. For example A = 0, B = 1 etc. |
| widget_answer_label | String | answer text |
| duration_ms | Int | how much time did it take to answer |
w-quiz-grouped-answer
Click on any point in "quiz category grouped" widget
| Key | Type | Description |
|---|---|---|
| story_id | Int | unique story ID |
| feed_id | Int? | ID of the feed the story was opened from. null if it's single |
| slide_index | Int | index of story's slide where callback was called |
| widget_id | String | unique widget ID |
| widget_label | String | quiz question |
| widget_answer | Int | answer index. For example A = 0, B = 1 etc. |
| widget_answer_label | String | answer text |
| duration_ms | Int | how much time did it take to answer |
w-data-input-focus
Click input field in "ask question" widget (show dialog)
| Key | Type | Description |
|---|---|---|
| story_id | Int | unique story ID |
| feed_id | Int? | ID of the feed the story was opened from. null if it's single |
| slide_index | Int | index of story's slide where callback was called |
| widget_id | String | unique widget ID |
| widget_label | String | question text |
w-data-input-save
Send data in "ask question" widget (close dialog)
| Key | Type | Description |
|---|---|---|
| story_id | Int | unique story ID |
| feed_id | Int? | ID of the feed the story was opened from. null if it's single |
| slide_index | Int | index of story's slide where callback was called |
| widget_id | String | unique widget ID |
| widget_label | String | question text |
| widget_value | String | sent text from dialog |
w-range-slider-answer
Send slider value in "feedback" widget. Can be called on click or slider changes (optionally)
| Key | Type | Description |
|---|---|---|
| story_id | Int | unique story ID |
| feed_id | Int? | ID of the feed the story was opened from. null if it's single |
| slide_index | Int | index of story's slide where callback was called |
| widget_id | String | unique widget ID |
| widget_label | String | question text |
| widget_answer | Int | sent value (from 0 to 100) |
w-poll-answer
Click on any point in "poll" widget (yes/no)
| Key | Type | Description |
|---|---|---|
| story_id | Int | unique story ID |
| feed_id | Int? | ID of the feed the story was opened from. null if it's single |
| slide_index | Int | index of story's slide where callback was called |
| widget_id | String | unique widget ID |
| widget_label | String | poll question text |
| widget_answer | Int | answer index (0 to left or 1 to right button) |
| widget_answer_label | String | answer text |
| duration_ms | Int | how much time did it take to answer |
w-poll-clarification
Send data from dialog in "poll" widget after choosing answer (if set)
| Key | Type | Description |
|---|---|---|
| story_id | Int | unique story ID |
| feed_id | Int? | ID of the feed the story was opened from. null if it's single |
| slide_index | Int | index of story's slide where callback was called |
| widget_id | String | unique widget ID |
| widget_label | String | poll question text |
| widget_answer | Int | answer index (0 to left or 1 to right button) |
| widget_answer_label | String | answer text |
| duration_ms | Int | how much time did it take to answer |
| widget_value | String | sent text from dialog |
w-poll-layers-answer
Click on any point in "poll with layers" widget (yes/no)
| Key | Type | Description |
|---|---|---|
| story_id | Int | unique story ID |
| feed_id | Int? | ID of the feed the story was opened from. null if it's single |
| slide_index | Int | index of story's slide where callback was called |
| widget_id | String | unique widget ID |
| widget_label | String | poll's question text |
| widget_answer | Int | answer's index (0 to left or 1 to right button) |
| duration_ms | Int | how much time did it take to answer |
w-vote-answer
Click on any point in "vote" widget
| Key | Type | Description |
|---|---|---|
| story_id | Int | unique story ID |
| feed_id | Int? | ID of the feed the story was opened from. null if it's single |
| slide_index | Int | index of story's slide where callback was called |
| widget_id | String | unique widget ID |
| widget_label | String | vote question text |
| widget_answer | Int | answer index (0 to N-1 where N - num of answer points) |
| widget_value | String | answer text |
| duration_ms | Int | how much time did it take to answer |
w-rate-answer
Click on "rate us" widget
| Key | Type | Description |
|---|---|---|
| story_id | Int | unique story ID |
| feed_id | Int? | ID of the feed the story was opened from. null if it's single |
| slide_index | Int | index of story's slide where callback was called |
| widget_id | String | unique widget ID |
| widget_label | String | widget text |
| widget_answer | Int | answer index (0 to 5) |
| widget_value | String | user input text |
| duration_ms | Int | how much time did it take to answer |
w-test-answer
Click on any point in "test" widget
| Key | Type | Description |
|---|---|---|
| story_id | Int | unique story ID |
| feed_id | Int? | ID of the feed the story was opened from. null if it's single |
| slide_index | Int | index of story's slide where callback was called |
| widget_id | String | unique widget ID |
| widget_label | String | test's question text |
| widget_answer | Int | answer index (0 to N-1 where N - num of answer points or -1 - for widget without answer (timer expired)) |
| widget_answer_label | String | answer text |
| widget_answer_score | Int | how much points user get for this answer |
| duration_ms | Int | how much time did it take to answer |
w-copy
Click on "copy" widget
| Key | Type | Description |
|---|---|---|
| story_id | Int | unique story ID |
| feed_id | Int? | ID of the feed the story was opened from. null if it's single |
| slide_index | Int | index of story's slide where callback was called |
| widget_id | String | unique widget ID |
| widget_label | String | button's text |
| widget_value | String | copied text |
w-share
Click on "share" widget
| Key | Type | Description |
|---|---|---|
| story_id | Int | unique story ID |
| feed_id | Int? | ID of the feed the story was opened from. null if it's single |
| slide_index | Int | index of story's slide where callback was called |
| widget_id | String | unique widget ID |
| widget_label | String | button text |
| widget_value | String | shared text |
| widget_answer | Int | 0 - share successful, 1 - share canceled |
| widget_answer_label | String | sharing application package |
w-goods-open
Opens goods list in SDK
| Key | Type | Description |
|---|---|---|
| story_id | Int | unique story ID |
| feed_id | Int? | ID of the feed the story was opened from. null if it's single |
| slide_index | Int | index of story's slide where callback was called |
| widget_id | String | unique widget ID |
w-goods-click
Click on any good in list
| Key | Type | Description |
|---|---|---|
| story_id | Int | unique story ID |
| feed_id | Int? | ID of the feed the story was opened from. null if it's single |
| slide_index | Int | index of story's slide where callback was called |
| widget_id | String | unique widget ID |
| widget_value | String | good's sku |
w-products-click
Click on "products" widget
| Key | Type | Description |
|---|---|---|
| story_id | Int | unique story id |
| feed_id | Int? | unique feed id where stories was opened. Null if it's single. |
| slide_index | Int | index of story's slide where callback was called |
| widget_id | String | unique widget id |
| widget_label | String | button's text |
| widget_value | Number[] | offers sku (platform internal ids) |
w-products-open
Opens a product list in SDK
| Key | Type | Description |
|---|---|---|
| story_id | Int | unique story id |
| feed_id | Int? | unique feed id where stories was opened. Null if it's single. |
| slide_index | Int | index of story's slide where callback was called |
| widget_id | String | unique widget id |
| widget_label | String | button's text |
| widget_value | Number[] | offers sku (platform internal ids) |
| widget_items | Number[] | offers ids |
w-products-card-click
Click on offer card in a product list
| Key | Type | Description |
|---|---|---|
| story_id | Int | unique story id |
| feed_id | Int? | unique feed id where stories was opened. Null if it's single. |
| slide_index | Int | index of story's slide where callback was called |
| widget_id | String | unique widget id |
| widget_label | String | button's text |
| widget_value | Number | offer id |
| widget_value_id | Number | offer id (platform internal id) |
w-products-add-to-cart
Adding a product to cart event
| Key | Type | Description |
|---|---|---|
| story_id | Int | unique story id |
| feed_id | Int? | unique feed id where stories was opened. Null if it's single. |
| slide_index | Int | index of story's slide where callback was called |
| widget_id | String | unique widget id |
| quantity | Number | Offers quantity |
| widget_value | Number | offer id |
| widget_value_id | Number | offer id (platform internal id) |
w-products-go-to-cart
Go to product cart event
| Key | Type | Description |
|---|---|---|
| story_id | Int | unique story id |
| feed_id | Int? | unique feed id where stories was opened. Null if it's single. |
| slide_index | Int | index of story's slide where callback was called |
| widget_id | String | unique widget id |
w-product-carousel-card-click
Click on product card in a product carousel
| Key | Type | Description |
|---|---|---|
| story_id | Int | unique story id |
| feed_id | Int? | unique feed id where stories was opened. Null if it's single. |
| slide_index | Int | index of story's slide where callback was called |
| widget_id | String | unique widget id |
| widget_value | Number | offer id |
| widget_value_id | Number | offer id (platform internal id) |
w-product-carousel-buy-click
Click on button "Buy now"
| Key | Type | Description |
|---|---|---|
| story_id | Int | unique story id |
| feed_id | Int? | unique feed id where stories was opened. Null if it's single. |
| slide_index | Int | index of story's slide where callback was called |
| widget_id | String | unique widget id |
| widget_value | Number | offer id |
| widget_value_id | Number | offer id (platform internal id) |
w-product-carousel-add-to-cart
Adding a product to cart event
| Key | Type | Description |
|---|---|---|
| story_id | Int | unique story id |
| feed_id | Int? | unique feed id where stories was opened. Null if it's single. |
| slide_index | Int | index of story's slide where callback was called |
| widget_id | String | unique widget id |
| quantity | Number | Offers quantity |
| widget_value | Number | offer id |
| widget_value_id | Number | offer id (platform internal id) |
w-product-carousel-go-to-cart
Go to product cart event
| Key | Type | Description |
|---|---|---|
| story_id | Int | unique story id |
| feed_id | Int? | unique feed id where stories was opened. Null if it's single. |
| slide_index | Int | index of story's slide where callback was called |
| widget_id | String | unique widget id |
w-barcode
Click on "barcode" widget
| Key | Type | Description |
|---|---|---|
| story_id | Int | unique story id |
| feed_id | Int? | unique feed id where stories was opened. Null if it's single. |
| slide_index | Int | index of story's slide where callback was called |
| widget_id | String | unique widget id |
| widget_label | String | button's text |
| widget_value | String | copied text |
w-tooltip-show
Widget "tooltip" rendering on slide start
| Key | Type | Description |
|---|---|---|
| story_id | Int | unique story id |
| feed_id | Int? | unique feed id where stories was opened. Null if it's single. |
| slide_index | Int | index of story's slide where callback was called |
| widget_id | String | unique widget id |
| widget_label | String | button's text |
| widget_tooltip_template | Number | Tooltip content template (0 - without template. 1 - ERID template) |
w-tooltip-click
Click on "tooltip" widget
| Key | Type | Description |
|---|---|---|
| story_id | Int | unique story id |
| feed_id | Int? | unique feed id where stories was opened. Null if it's single. |
| slide_index | Int | index of story's slide where callback was called |
| widget_id | String | unique widget id |
| widget_label | String | button's text |
| widget_tooltip_template | Number | Tooltip content template (0 - without template. 1 - ERID template) |
w-tooltip-copy-click
Copy content from tooltip in "tooltip" widget (applicable only for ERID template)
| Key | Type | Description |
|---|---|---|
| story_id | Int | unique story id |
| feed_id | Int? | unique feed id where stories was opened. Null if it's single. |
| slide_index | Int | index of story's slide where callback was called |
| widget_id | String | unique widget id |
| widget_label | String | button's text |
| widget_value | String | copied text |
| widget_tooltip_template | Number | Tooltip content template (0 - without template. 1 - ERID template) |
w-reactions-answer
Click on any reaction in "reactions" widget
| Key | Type | Description |
|---|---|---|
| story_id | Int | unique story id |
| slide_index | Int | index of story's slide where callback was called |
| widget_id | String | unique widget id |
| widget_answer | Int | reaction index (0 to N-1 where N - num of reactions) |
| duration_ms | Int | how much time did it take to answer |
w-scratch-card-complete
Complete scratch the layer on the "scratch card" widget
| Key | Type | Description |
|---|---|---|
| story_id | Int | unique story id |
| slide_index | Int | index of story's slide where callback was called |
| widget_id | String | unique widget id |
| duration_ms | Int | how much time did it take to scratch the layer |