Skip to content

Commit

Permalink
docs(README): improve documentation of parameters (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrChocolatine authored Mar 25, 2021
1 parent 2d352e7 commit d0b1432
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,26 @@ Be aware the use of Pendo makes sense only once your visitor is identified in yo

#### Service API

There are 2 methods implemented by the Pendo adapter:
The add-on [`ember-metrics`](https://github.com/poteto/ember-metrics) includes a `metrics` Service,
which provides the methods:

- `identify([analyticsName], options)`
- `identify(analyticsName?: string | string[], analyticsOptions?: {})`

For analytics services that have identification functionality.

- `trackEvent([analyticsName], options)`
- `trackEvent(analyticsName?: string | string[], analyticsOptions?: {})`

This is a general purpose method for tracking a named event in your application.


For both methods: (see [ember-metrics#api](https://github.com/adopted-ember-addons/ember-metrics#api))

- Parameter `analyticsName` is optional and allows you to specifically target analytics Services.

- Parameter `analyticsOptions` is optional and allows you to pass a configuration to the adapter of
the targeted analytics Services.


### Activate Pendo

To activate Pendo, you should call the `identify` function provided by the `metrics` service. To do so, your app should contains the following code:
Expand Down

0 comments on commit d0b1432

Please sign in to comment.