Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit eeca53e

Browse files
committed
Replacing symlinks with real files
1 parent e66c399 commit eeca53e

File tree

1,049 files changed

+104198
-729
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,049 files changed

+104198
-729
lines changed

src/guides/v2.3/advanced-reporting/data-collection.md

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 209 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,209 @@
1+
---
2+
group: advanced-reporting
3+
title: Data collection for advanced reporting
4+
functional_areas:
5+
- Reports
6+
---
7+
8+
A Magento instance collects data that the Magento Business Intelligence (MBI) service uses to build the advanced reports.
9+
All the data are stored in an encrypted archive file which is securely transferred to the MBI.
10+
Data collection is declared in a configuration file `etc/analytics.xml`. It declares:
11+
12+
- Which report files must be included into the archive file.
13+
- Which provider classes must collect data for each report file.
14+
- Which report data configuration must be applied to collected data.
15+
16+
{:.bs-callout-warning}
17+
This topic serves to provide better understanding of how data collection works. Any changes in configuration files will cause issues, because the MBI service doesn't expect any changes of configuration in the current version.
18+
19+
## Example
20+
21+
An example of the `etc/analytics.xml` file:
22+
23+
```xml
24+
<?xml version="1.0"?>
25+
26+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Analytics:etc/analytics.xsd">
27+
<file name="modules">
28+
<providers>
29+
<reportProvider name="modules" class="Magento\Analytics\ReportXml\ReportProvider">
30+
<parameters>
31+
<name>modules</name>
32+
</parameters>
33+
</reportProvider>
34+
</providers>
35+
</file>
36+
<file name="store_config">
37+
<providers>
38+
<customProvider name="store_config" class="Magento\Analytics\Model\StoreConfigurationProvider"/>
39+
</providers>
40+
</file>
41+
<file name="stores">
42+
<providers>
43+
<reportProvider name="stores" class="Magento\Analytics\ReportXml\ReportProvider">
44+
<parameters>
45+
<name>stores</name>
46+
</parameters>
47+
</reportProvider>
48+
<customProvider name="store_config" class="Magento\Analytics\Model\StoreConfigurationProvider"/>
49+
</providers>
50+
</file>
51+
</config>
52+
```
53+
54+
The example configuration file declares the following:
55+
56+
- The `modules.csv`, `store_config.csv`, and `stores.csv` report files must be included in the archive file prepared for the MBI service.
57+
- `modules.csv` must contain data provided by the `\Magento\Analytics\ReportXml\ReportProvider` class.
58+
Provided data must be configured according to the `modules` report declarations defined in the `etc/reports.xml` file.
59+
- `store_config.csv` must contain data provided by the `Magento\Analytics\Model\StoreConfigurationProvider` class.
60+
- `stores.csv` must contain data provided by the `\Magento\Analytics\ReportXml\ReportProvider` class.
61+
Provided data is configured according to the `store_config` report declarations defined in the `etc/reports.xml` file.
62+
Also, the report file must contain data provided by the `Magento\Analytics\Model\StoreConfigurationProvider` class.
63+
64+
## Extensibility
65+
66+
Configuration of data collection can be extended or changed in any module adding the corresponding `<module_name>/etc/analytics.xml` file with nodes that must be changed or added.
67+
68+
## Structure
69+
70+
The `etc/analytics.xsd` schema declares the structure of the `etc/analytics.xml` file.
71+
72+
{% include_relative img/analytics_xsd.svg %}
73+
74+
### `<config>`
75+
76+
Configuration of an XML.
77+
78+
|Attribute|Description|Constant value|Use|
79+
|---|---|---|---|
80+
|`xmlns:xsi`|Default namespace declaration|`"http://www.w3.org/2001/XMLSchema-instance"`|Required|
81+
|`xsi:noNamespaceSchemaLocation`|An XML Schema document that does not have a target namespace|`"urn:magento:module:Magento_Analytics:etc/analytics.xsd"`|Required|
82+
83+
### `<file>`
84+
85+
A report file (`.csv` by default) with collected data to be added to the archive file.
86+
The `\Magento\Analytics\Model\ReportWriter` class is responsible for a decision about a data file extension (`.csv`, `.json`, etc.).
87+
88+
|Attribute|Description|Example value|Use|
89+
|---|---|---|---|
90+
|`name`|A filename with no extension|`"modules"`|Required|
91+
|`prefix`|Reserved for future use.|--|--|
92+
93+
```xml
94+
<config ...>
95+
96+
<!-- Adds a report file `module.csv` to the archive file -->
97+
<file name="modules">
98+
...
99+
</file>
100+
101+
<!-- Adds a report file `stores.csv` to the archive file -->
102+
<file name="stores">
103+
...
104+
</file>
105+
106+
</config>
107+
```
108+
109+
### `<providers>`
110+
111+
The node must contain a `<reportProvider>` node, or a `<customProvider>` node, or both.
112+
113+
```xml
114+
...
115+
<file ...>
116+
<!-- A report provider adds data to the report file -->
117+
<providers>
118+
<reportProvider ...>
119+
</providers>
120+
</file>
121+
122+
<file ...>
123+
<!-- A custom provider adds data to the report file -->
124+
<providers>
125+
<customProvider ...>
126+
</providers>
127+
</file>
128+
129+
<file ...>
130+
<providers>
131+
<!-- A report provider and a custom provider add data to the report file -->
132+
<reportProvider ...>
133+
<customProvider ...>
134+
</providers>
135+
</file>
136+
...
137+
```
138+
139+
### `<reportProvider>`
140+
141+
A class that provides data for a report file.
142+
It can contain parameters.
143+
144+
|Attribute|Description|Example value|Use|
145+
|---|---|---|---|
146+
|`name`|A provider name|`modules`|Required|
147+
|`class`|Full name of a class that provides data|`"Magento\Analytics\ReportXml\ReportProvider"`|Required|
148+
149+
Currently there is only one report provider available that is `Magento\Analytics\ReportXml\ReportProvider`.
150+
151+
```xml
152+
...
153+
<providers>
154+
<!-- A report provider `stores` uses the `Magento\Analytics\ReportXml\ReportProvider` class to collect report data -->
155+
<reportProvider name="stores" class="Magento\Analytics\ReportXml\ReportProvider">
156+
...
157+
</reportProvider>
158+
</providers>
159+
...
160+
```
161+
162+
### `<parameters>`
163+
164+
Parameters used by `<reportProvider>`.
165+
Currently there is only one parameter is available. It is declared in `<name>`.
166+
167+
```xml
168+
...
169+
<reportProvider name="stores" class="Magento\Analytics\ReportXml\ReportProvider">
170+
<!-- The report provider `stores` uses a configuration of a report with name `store_report` declared in `etc/reports.xml` -->
171+
<parameters>
172+
<name>store_report</name>
173+
</parameters>
174+
</reportProvider>
175+
...
176+
```
177+
178+
If `reportProvider class="Magento\Analytics\ReportXml\ReportProvider"`, then `<name>` references to the `<report name />` in `reports.xml`.
179+
180+
### `<customProvider>`
181+
182+
A class that provides data for a report file.
183+
It cannot contain any parameters.
184+
185+
|Attribute|Description|Example value|Use|
186+
|---|---|---|---|
187+
|`name`|A provider name|"store_config"|Required|
188+
|`class`|Full name of a class that provides data|`"Magento\Analytics\Model\StoreConfigurationProvider"`|Required|
189+
190+
```xml
191+
...
192+
<providers>
193+
<!-- A report provider `store_config` uses the `Magento\Analytics\Model\StoreConfigurationProvider` class to collect report data -->
194+
<customProvider name="store_config" class="Magento\Analytics\Model\StoreConfigurationProvider"/>
195+
</providers>
196+
...
197+
```
198+
199+
{:.ref-header}
200+
Related topics
201+
202+
[Modules providing advanced reporting][modules]
203+
204+
<!-- LINK DEFINITIONS -->
205+
206+
[modules]: modules.html
207+
208+
<!-- ABBREVIATIONS -->
209+
*[MBI]: Magento Business Analytics

src/guides/v2.3/advanced-reporting/img/analytics_xsd.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Loading

src/guides/v2.3/advanced-reporting/img/reports_xsd.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/guides/v2.3/advanced-reporting/img/reports_xsd.svg

Lines changed: 1 addition & 0 deletions
Loading

src/guides/v2.3/advanced-reporting/modules.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)