Back to Amphtml

AMP Carousel and Analytics

extensions/amp-carousel/amp-carousel-analytics.md

latest1.4 KB
Original Source

AMP Carousel and Analytics

<amp-carousel type="slides"> issues events for major states . These events can be reported through the analytics configuration by using triggers.

See amp-analytics.md for details on amp-analytics configuration.

The amp-carousel-change event is issued when there is any change in the slide that is curently visible. Use these configurations to fire a request for this event.

javascript
"triggers": {
  "ampCarouselChange": {
    "on": "amp-carousel-change",
    "request": "event"
  }
}

The amp-carousel-next event is issued when there is a travesal to the next slide. Use these configurations to fire a request for this event.

javascript
"triggers": {
  "ampCarouselNext": {
    "on": "amp-carousel-next",
    "request": "event"
  }
}

The amp-carousel-prev event is issued when there is a travesal to the previous slide. Use these configurations to fire a request for this event.

javascript
"triggers": {
  "ampCarouselPrev": {
    "on": "amp-carousel-prev",
    "request": "event"
  }
}

Vars

Description of the variables can be found in the analytics-vars.md file.