Skip to content

Commit

Permalink
Add information about webvisor #12
Browse files Browse the repository at this point in the history
According to #12
  • Loading branch information
baitun authored and narkq committed Oct 10, 2018
1 parent 50b3942 commit c92a86a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ class MyComponent extends React.Component {
```

Please note that you need to initialize the tracker object only once.
Because of that, you should insert initializer to the place where it won't be remounted (that means at least outside of router scope).
Because of that, you should insert initializer to the place where it won't be remounted (that means at least outside of router scope).
If you want to use [webvisor](https://metrika.yandex.ru/promo/webvisor), you should pass `options={{webvisor: true}}` to to `YMInitializer`, for example:
```
<YMInitializer accounts={[987654321]} options={{webvisor: true}}/>
```


You can create several identical trackers (that might be useful for domain-wise segmentation).
Expand All @@ -51,7 +55,7 @@ ym('reachGoal', 'whateverGoal', {awesomeParameter: 42});

See [#6](https://github.com/narkq/react-yandex-metrika/issues/6) for details.
```javascript
<YMInitializer accounts={[31337]} version="2" />
<YMInitializer accounts={[31337]} options={{webvisor: true}} version="2" />
```

### Migration from 1.0
Expand Down

0 comments on commit c92a86a

Please sign in to comment.