Last modified by jhurst on 2024/04/02 14:25

Show last authors
1 **Configuration: Authentication data for Digdash
2 (service account + P12 file + Google Analytics account’s ID)**
3
4 {{ddtoc/}}
5
6 = Context =
7
8 This document explains how to get authentication information that Digdash needs to connect to your Google Analytics account.
9
10 We need the following information:
11
12 * Service account
13 * P12 file
14 * Google account’s ID
15
16 = Prerequisites =
17
18 * Being a G Suite subscriber or Cloud Identity subscriber
19 * Having an activated Organization resource on your domain
20
21 = Creating a new project =
22
23 Go to your Google Cloud console at:
24
25
26 [[https:~~/~~/console.cloud.google.com/projectselector/home/dashboard?supportedpurview=project>>url:https://console.cloud.google.com/projectselector/home/dashboard?supportedpurview=project]]
27
28
29
30 [[image:google_analytics_connector_config_en_html_181801a2a7fd7771.png||height="245" width="649"]]
31 \\
32
33 You can either select an existing project or create a new project.
34
35 We are going to focus on the creation.
36
37 Then click on **Create**.
38
39
40 The next screen allows you to define the project. Give it a name and choose its associated Organization.Then click on **Create**.
41
42 [[image:google_analytics_connector_config_en_html_df76892efb913ae4.png||height="392" width="389"]]
43 \\
44
45 Please wait for a few seconds, the creation takes a few seconds.
46
47 |(((
48 * [[image:google_analytics_connector_config_en_html_fe28954d2392b1bc.png||height="72" width="72"]]
49 )))|(((
50 * The Organization resource is the root node in the Google Cloud Platform resource hierarchy and is the hierarchical super node of projects. A project is then defined after an Organization and the choice is definitive.
51 )))
52
53 *
54
55 = Activating Google Analytics API =
56
57 Go to your Google Cloud console at:
58
59 [[https:~~/~~/console.cloud.google.com/projectselector/home/dashboard?supportedpurview=project>>url:https://console.cloud.google.com/projectselector/home/dashboard?supportedpurview=project]]
60
61
62 Select the new project we just created.
63
64 [[image:google_analytics_connector_config_en_html_2aabb4d8e5e905f0.png||height="176" width="554"]]
65 \\
66
67 [[image:google_analytics_connector_config_en_html_a731c259e2abab2a.png||height="145" width="554"]]
68 \\
69
70 In the left side bar, go to **API & services** > **Library**
71
72 [[image:google_analytics_connector_config_en_html_9046131ba6772a4.png||height="195" width="512"]]
73 \\
74
75 Get down on the page to find **Other** > **Analytics API**. Click on it.
76
77 [[image:google_analytics_connector_config_en_html_b6510cafb3c5948c.png||height="299" width="492"]]
78 \\
79
80 In the next screen, click on **Enable**.
81
82 [[image:google_analytics_connector_config_en_html_2f4c69ab0ddf2ceb.png||height="266" width="440"]]
83 \\
84
85 = Creating a service account and a P12 file =
86
87 In the left side bar, go to **API & services** > **Credentials**
88
89 [[image:google_analytics_connector_config_en_html_1286373fbe7a35cc.png||height="295" width="402"]]
90 \\
91
92 In the next screen, click on **Create credentials** > **Service account key**
93
94 [[image:google_analytics_connector_config_en_html_a068c26f94e2d318.png||height="253" width="477"]]
95 \\
96
97 In the next screen, select **New service account** in the dropdown list **Service account** and enter a name in **Service account name.** This generates a **Service account ID** in an email address form (ending with **gserviceaccount.com**).
98
99 [[image:google_analytics_connector_config_en_html_e12bda205963e9f1.png||height="308" width="519"]]
100 \\
101
102 In the **Role** list, select **Project** > **Owner**
103
104 In the options **Key type**, select **P12** then click on **Create**.
105
106 [[image:google_analytics_connector_config_en_html_d7b65b751eed32aa.png||height="278" width="516"]]
107 \\
108
109 The P12 file will be downloaded automatically on your disk, please save it preciously. Click on **Close**.
110
111
112 [[image:google_analytics_connector_config_en_html_17b76a337cbe4f5f.png||height="254" width="398"]]
113 \\
114
115 In the next page, click on **Manage service accounts** (on the right).
116
117 [[image:google_analytics_connector_config_en_html_70fd7d22ff2995f5.png||height="197" width="554"]]
118 \\
119
120 Then, get the **Service account ID** (in an email address form).
121
122 [[image:google_analytics_connector_config_en_html_5e3c9dd16d7c4116.png||height="130" width="554"]]
123 \\
124
125 = Connecting service account and Google Analytics account =
126
127 Now, we are going to connect the service account we created to your Google Analytics account.
128
129 Go to your Google Analytics account at:
130
131 [[https:~~/~~/analytics.google.com/analytics/web/>>url:https://analytics.google.com/analytics/web/]]
132
133 In the left side bar, click on **Admin**
134
135 [[image:google_analytics_connector_config_en_html_ec2f8d8418b19ee4.png||height="330" width="152"]]
136 \\
137
138 Then click on **User Management**
139
140 [[image:google_analytics_connector_config_en_html_5df7afd42864fc5c.png||height="223" width="341"]]
141 \\
142
143 Add the service account ID (in an email address form) and let **Read & Analyse** in the list next to the field.
144
145 [[image:google_analytics_connector_config_en_html_d8e9357e5bf34acc.png||height="263" width="598"]]
146 \\
147
148 Please wait for a few seconds so the changes are taken in count (about 3 minutes).
149
150 = Getting Google Analytics account’s ID =
151
152 This is the ID you will need to enter in Digdash Enterprise Studio.
153
154 Go to your Google Analytics account at:
155
156 [[https:~~/~~/analytics.google.com/analytics/web/>>url:https://analytics.google.com/analytics/web/]]
157
158
159 You can display all your Google Analytics accounts clicking on the button **All accounts** at the top right corner of the page.
160
161 [[image:google_analytics_connector_config_en_html_ff83bfd3b44dc33e.png||height="135" width="252"]]
162 \\
163
164 This lists all your Google Analytics accounts with their names, their IDs (first column). Please take note of the Google Analytics account’s ID you want to work with (the one that is linked to our service account).
165
166 [[image:google_analytics_connector_config_en_html_875a04a8c4dc17f6.png||height="189" width="392"]]
167 \\
168
169 = Connecting to Google Analytics via Digdash Enterprise Studio =
170
171 When in Digdash Enterprise Studio, choose a new Google Analytics datasource.
172
173 In the interface, enter the corresponding information:
174
175 * Service account : it is the service account name we got in an email address form (in the example: **testaccount@projet-test-155909.iam.gserviceaccount.com**)
176 * P12 file: It is the P12 downloaded when creating the service account)
177 * Account ID: this is the identifier retrieved from Google Analytics, in the example **64134024**)
178
179 Load the objects.
180
181 [[image:google_analytics_connector_config_en_html_e2f0a34d952c9108.png||height="492" width="395"]]
182 \\
183
184 //(//the screenshot is only indicative and does not necessarily include the data from the previous examples//)//
185
186
187 [[image:google_analytics_connector_config_en_html_469c99f6b2e0fa7.png||height="337" width="554"]]
188 \\
189
190