Welcome to mirror list, hosted at ThFree Co, Russian Federation.

index.md « website_project_with_analytics « tutorials « doc - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 90e85d0f88c8e7e2f0b2adf113964be18e8f2c02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
---
stage: Plan
group: Optimize
info: For assistance with this tutorial, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments-to-other-projects-and-subjects.
---

# Tutorial: Set up an analytics-powered website project **(ULTIMATE ALL)**

When you work on a complex project (for example, a website), you likely collaborate with other people to build and maintain it.
The way you collaborate and communicate in your team can make or break the project, so you want processes in place that help team members follow and achieve the common goal.
Analytics metrics help you understand how the team is doing, and if you need to adjust processes so you can work better together.
GitLab provides different types of [analytics](../../user/analytics/index.md) insights at the instance, group, and project level.
If this list seems long and you're not sure where to start, then this tutorial is for you.

Follow along to learn how to set up an example website project, collaborate with other GitLab users,
and use project-level analytics reports to evaluate the development of your project.

Here's an overview of what we're going to do:

1. Create a project from a template.
1. Invite users to the project.
1. Create project labels.
1. Create a value stream with a custom stage.
1. Create an Insights report.
1. View merge request and issue analytics.

## Before you begin

- You must have the Owner role for the group in which you create the project.

## Create a project from a template

First of all, you need to create a project in your group.

GitLab provides project templates,
which make it easier to set up a project with all the necessary files for various use cases.
Here, you'll create a project for a Hugo website.

To create a project:

1. On the left sidebar, at the top, select **Create new** (**{plus}**) and **New project/repository**.
1. Select **Create from template**.
1. Select the **Pages/Hugo** template.
1. In the **Project name** text box, enter a name (for example `My website`).
1. From the **Project URL** dropdown list, select the group you want to create the project in.
1. In the **Project slug** text box, enter a slug for your project (for example, `my-website`).
1. Optional. In the **Project description** text box, enter a description of your project.
   For example, "Analytics-powered project for a website built with Hugo". You can add or edit this description at any time.
1. Under **Visibility Level**, select the desired level for the project.
   If you create the project in a group, the visibility setting for a project must be at least as restrictive as the visibility of its parent group.
1. Select **Create project**.

Now you have a project with all the files you need for a Hugo website.

## Invite users to the project

When working on a large project such as a website, you'll likely need to collaborate with other people,
such as developers and designers.
You have to invite them to your project, so that they get access to all the files, issues, and reports.

To invite a user to the `My website` project:

1. In the project, select **Manage > Members**.
1. Select **Invite members**.
1. Enter the user's **username**.
1. From the **Role** dropdown list, select the **Developer** role or higher.
   Users must have at least the Developer role to view analytics and contribute to issues and merge requests.
1. Optional. In the **Access expiration date** picker, select a date.
   This step is recommended if the invited member is expected to contribute to the project only for a limited time.
1. Select **Invite**.

The invited user should now be a member of the project.
You can [view, filter, and search for members](../../user/project/members/index.md#filter-and-sort-members) of your project.

## Create project labels

[Labels](../../user/project/labels.md) help you organize and track issues, merge requests, and epics.
You can create as many labels as you need for your projects and groups.
For example, for a website project like this one, the labels `feature request` and `bug` might be useful.

To create a project label, in the `My website` project:

1. Select **Manage > Labels**.
1. Select **New label**.
1. In the **Title** field, enter `feature request`.
1. Optional. In the **Description** field, enter additional information about how and when to use this label.
1. Optional. Select a color by selecting from the available colors, or enter a hex color value for a specific color in the **Background color** field.
1. Select **Create label**.

The label should now appear in the [label list](../../user/project/labels.md#view-project-labels),
and you can use it to create a value stream with a custom stage.

## Create a value stream with a custom stage

Now that you have a project with collaborators, you can start tracking and visualizing the activity.
[Value Stream Analytics](../../user/group/value_stream_analytics/index.md) helps you measure the time it takes
to go from an idea to production, and identify inefficiencies in the development process.

To get started, create a value stream in the `My website` project:

1. Select **Analyze > Value Stream Analytics**.
1. Select **Create new Value Stream**.
1. Enter a name for the value stream, for example `My website value stream`.
1. Select **Create from default template**.
1. To add a custom stage, select **Add another stage**.
   - Enter a name for the stage, for example `Labeled MRs merged`.
   - From the **Start event** dropdown list, select **Merge request label was added**, then the `feature request` label.
   - From the **Stop event** dropdown list, select **Merge request merged**.
1. Select **Create value stream**.

After you create the value stream, data starts collecting and loading.
This process might take a while. When it's ready, the dashboard is displayed in **Analyze > Value Stream Analytics**.

In the meantime, you can start creating an Insights report for your project.

## Create an Insights report

While Value Stream Analytics give an overview of the entire development process,
[Insights](../../user/project/insights/index.md) provide a more granular view of a project's
issues created and closed, and average merge time of merge requests.
This data visualization can help you triage issues at a glance.

You can create as many Insights reports with different charts as you need.
For example, a stacked bar chart for bugs by severity or a line chart for issues opened over the month.

To create an Insights report, in the `My website` project:

1. Above the file list, select the plus icon, then select **New file**.
1. In the **File name** text box, enter `.gitlab/insights.yml`.
1. In the large text box, enter the following code:

   ```yaml
   bugsCharts:
      title: "Charts for bugs"
      charts:
         - title: "Monthly bugs created"
            description: "Open bugs created per month"
            type: bar
            query:
            data_source: issuables
            params:
               issuable_type: issue
               issuable_state: opened
               filter_labels:
                  - bug
               group_by: month
               period_limit: 12
   ```

1. Select **Commit changes**.

Now you have an Insights bar chart that displays the number of issues with the label `~bug` created per month, for the past 12 months.
You and project members with at least the Developer role can view the Insights report in **Analyze > Insights**.

## View merge request and issue analytics

In addition to the Insights reports, you can get detailed analytics on the merge requests and issues of your project.
[Merge request analytics](../../user/analytics/merge_request_analytics.md) and [Issue analytics](../../user/analytics/issue_analytics.md) display charts and tables with metrics such as assignees, merge request throughput, and issue status.

To view merge request and issue analytics, in the `My website` project, select **Analyze > Merge request analytics** or **Analyze > Issue analytics**.

That was it! Now you have an analytics-powered website project on which you can collaborate efficiently with your team.