Skip to content

Commit

Permalink
[amp-story-auto-analytics] 📖 Add triggers docs for amp-story-auto-ana…
Browse files Browse the repository at this point in the history
…lytics (#33950)

* add triggers docs for amp-story-auto-analytics

* fix english
  • Loading branch information
Enriqe committed Apr 22, 2021
1 parent caf0c9b commit ff23744
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions extensions/amp-story-auto-analytics/amp-story-auto-analytics.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,37 @@ The `amp-story-auto-analytics` component configures [`amp-analytics`](https://am
## gtag-id (required)

Google Analytics ID used to link the story to the analytics account.

# Triggers

The following analytics triggers are dispatched when using the `amp-story-auto-analytics` component:

## `storyPageCount`

Fired once per story view. It includes the following parameters:

| Parameter | Value |
| --------------------- | --------------------------------------------------------------- |
| `ea` (event_action) | `story_page_count` |
| `ec` (event_category) | Title of the story (`<title>` tag in the HTML of the Web Story) |
| `el` (event_label) | Length of the story in number of pages |

## `storyEnd`

Fired once the last page of the story has been viewed. It includes the following parameters:

| Parameter | Value |
| --------------------- | --------------------------------------------------------------- |
| `ea` (event_action) | `story_complete` |
| `ec` (event_category) | Title of the story (`<title>` tag in the HTML of the Web Story) |
| `el` (event_label) | Title of the story (`<title>` tag in the HTML of the Web Story) |

## `storyPageIndex`

Fired once a page has been viewed. It includes the following parameters:

| Parameter | Value |
| --------------------- | --------------------------------------------------------------- |
| `ea` (event_action) | `story_pages_viewed` |
| `ec` (event_category) | Title of the story (`<title>` tag in the HTML of the Web Story) |
| `el` (event_label) | Index of the page viewed (starting with index 0) |

0 comments on commit ff23744

Please sign in to comment.