Is there a way we can create user interactive content within amp stories?

105 Views Asked by At

I am building an amp story where I need to take user input as choice. Let say there are 3 buttons Button 1, Button 2 and Button 3. If user clicks Button 1 content for choice 1 would be shown and similarly for other buttons.

I was trying to use AMP.setState for that. It works on a plain AMP page, but when amp story is added to the page, it doesn't work.

Here is the code for the above mentioned experiment

Please have a look and propose some suitable solution. Thanks.

1

There are 1 best solutions below

0
On BEST ANSWER

amp-story is not compatible with amp-bind.

Stories have an experimental feature under development called "branching" that allows user interactivity by splitting content state across different pages of the same story (see the work in progress documentation).

In your example, you would need to create separate pages of the story for the user to land on for if they've clicked Button 1, Button 2, or Button 3, respectively.