Skip to content

Commit 58b498a

Browse files
authored
style guide clean up
1 parent 0d1426d commit 58b498a

File tree

1 file changed

+20
-22
lines changed
  • src/connections/destinations/catalog/matomo

1 file changed

+20
-22
lines changed

src/connections/destinations/catalog/matomo/index.md

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,34 +7,31 @@ id: 54521fda25e721e32a72eee7
77
[Matomo](https://matomo.org/){:target="_blank"}, formerly Piwik, is the leading open source web analytics platform that gives you valuable insights into your website's visitors, your marketing campaigns and much more, so you can optimize your strategy and online experience of your visitors.
88

99
Segment’s Matomo destination code is open-source and can be viewed on GitHub:
10-
- [Javascript](https://github.com/segmentio/analytics.js-integrations/blob/master/integrations/piwik/lib/index.js){:target="_blank"}
11-
12-
## Getting Started
13-
10+
- [Javascript](https://github.com/segmentio/analytics.js-integrations/blob/master/integrations/piwik/lib/index.js){:target="_blank"}.
1411

12+
## Getting started
1513

1614
1. From the Segment web app, click **Catalog**.
17-
2. Search for "Matomo" in the Catalog, select it, and choose which of your sources to connect the destination to. Note the source must be sending events using our JavaScript library Analytics.js.
15+
2. Search for "Matomo" in the Catalog, select it, and choose which of your sources to connect the destination to. Note the source must be sending events using the Segment JavaScript library Analytics.js.
1816
3. In the destination settings, enter your Site ID. You can find your Site ID in your Matomo snippet.
19-
4. In the destination settings, enter your Server URL. You can find your Server URL in your snippet, we will append /matomo.php to the URL automatically.
20-
5. When you enable Matomo in your Segment settings, Segment's CDN is updated within 45 minutes. Once that happens, Segment asynchronously loads `matomo.js` on your page whenever it is loaded. This means you should remove Matomo's snippet from your page.
17+
4. In the destination settings, enter your Server URL. You can find your Server URL in your snippet. Segment automatically appends /matomo.php to the URL.
18+
5. When you enable Matomo in your Segment settings, Segment's CDN is updated within 45 minutes. Once that happens, Segment asynchronously loads `matomo.js` on your page whenever it is loaded. This means you should remove Matomo's snippet from your page.
2119

2220
## Page
2321
If you're not familiar with the Segment Specs, take a look to understand what the [Page method](/docs/connections/spec/page/) does. An example call would look like:
2422

2523
```js
2624
analytics.page();
2725
```
28-
29-
Our Page method triggers a call to Matomo's `trackPageView` method.
26+
The Page method triggers a call to Matomo's `trackPageView` method.
3027

3128
## Identify
3229
If you're not familiar with the Segment Specs, take a look to understand what the [Identify method](/docs/connections/spec/identify/) does. An example call would look like:
3330

3431
```js
3532
analytics.identify('97980cfea0068');
3633
```
37-
Our Identify method triggers a call to Matomo's `setUserId` method and will send the `userId` to Matomo.
34+
The Identify method triggers a call to Matomo's `setUserId` method and will send the `userId` to Matomo.
3835

3936
## Track
4037
If you're not familiar with the Segment Specs, take a look to understand what the [Track method](/docs/connections/spec/track/) does. An example call would look like:
@@ -43,9 +40,9 @@ If you're not familiar with the Segment Specs, take a look to understand what th
4340
analytics.track('Logged In');
4441
```
4542

46-
We'll record a Matomo event whenever you make a `track` call.
43+
Segement records a Matomo event whenever you make a `track` call.
4744

48-
For the example above, these event attributes are sent to Matomo:
45+
In the example, these event attributes are sent to Matomo:
4946

5047
<table>
5148
<tr>
@@ -58,7 +55,7 @@ For the example above, these event attributes are sent to Matomo:
5855
</tr>
5956
</table>
6057

61-
Find below another Track example, this time with all the available Matomo event parameters:
58+
See the following Track example, this time with all the available Matomo event parameters:
6259

6360
```js
6461
analytics.track('Created Account', {
@@ -68,7 +65,7 @@ analytics.track('Created Account', {
6865
})
6966
```
7067

71-
That call will create a Matomo Event with these attributes:
68+
That call creates a Matomo Event with these attributes:
7269

7370
<table>
7471
<tr>
@@ -89,17 +86,18 @@ That call will create a Matomo Event with these attributes:
8986
</tr>
9087
</table>
9188

92-
For **Event Value** you can name the event property `value` or `revenue`. We'll look for `value` first, then fall back to `revenue`.
89+
For **Event Value**, you can name the event property `value` or `revenue`. Segment looks for `value` first, then fall back to `revenue`.
9390

94-
## Best Practices
91+
## Best practices
9592

96-
Matomo allows you to set [custom variables](http://matomo.org/docs/custom-variables/){:target="_blank"} with your pageviews and events. With Segment, you can set page-scoped custom variables with any `track` call you make with analytics.js.
93+
Matomo lets you set [custom variables](http://matomo.org/docs/custom-variables/){:target="_blank"} with your pageviews and events. With Segment, you can set page-scoped custom variables with any Track call you make with analytics.js.
9794

98-
Since these custom variables must be mapped to an index you define, which can change from call to call, the only way we can support these custom variables with full flexibility is to allow you to pass your map in the `context.Matomo.customVars` dictionary of each call.
95+
Since these custom variables must be mapped to an index you define, which can change from call to call, the only way that Segment can support these custom variables with full flexibility is to allow you to pass your map in the `context.Matomo.customVars` dictionary of each call.
9996

100-
To take advantage of this feature, your `track` calls should look like this:
97+
To take advantage of this feature, your Track calls should look like this:
10198

102-
> **Note** The destination's name is still "piwik" in the JSON for these calls.
99+
> info ""
100+
> The destination's name is still "piwik" in the JSON for these calls.
103101
104102
```js
105103
analytics.track('event', {
@@ -117,6 +115,6 @@ analytics.track('event', {
117115
```
118116

119117
### Goals
120-
If you want to flag specific events as Matomo Goals you can do so by mapping those events in your Segment Source Destinations page under Matomo Settings.
118+
If you want to flag specific events as Matomo Goals, you can do so by mapping those events in your Segment Source Destinations page under Matomo Settings.
121119

122-
Fill in the event on the left and the Goal ID from Matomo on the right. Then every time the event happens we'll fire Matomo's `trackGoal` method.
120+
Fill in the event on the left and the Goal ID from Matomo on the right. Then every time the event happens Segment fires Matomo's `trackGoal` method.

0 commit comments

Comments
 (0)