Code source wiki de Connecteur Google Analytics - Configuration
Modifié par jhurst le 2024/04/02 14:25
Afficher les derniers auteurs
author | version | line-number | content |
---|---|---|---|
1 | Ce document décrit les étapes nécessaires à la récupération des identifiants Google Analytics pour DigDash (compte de service + fichier .p12 + identifiant du compte Google Analytics) | ||
2 | |||
3 | {{ddtoc/}} | ||
4 | |||
5 | ---- | ||
6 | |||
7 | = Contexte = | ||
8 | |||
9 | Il s’agit ici d’expliquer comment obtenir les champs de connexion pour pouvoir se connecter à un compte Google Analytics depuis DigDash. | ||
10 | |||
11 | Il s’agit des champs suivants : | ||
12 | |||
13 | * Compte de service | ||
14 | * Fichier .p12 | ||
15 | * Identifiant du compte Google Analytics | ||
16 | |||
17 | = Prérequis = | ||
18 | |||
19 | * Être client de G Suite ou Cloud Identity | ||
20 | * Être détenteur d’une ressource Organisation activé sur votre domaine. | ||
21 | |||
22 | = Création d’un nouveau projet = | ||
23 | |||
24 | Rendez-vous sur votre console Google Cloud à l’adresse suivante : | ||
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 | [[image:google_analytics_connector_config_fr_html_7bbe438a4cd2865c.png||queryString="width=685&height=265" height="265" width="685"]] | ||
29 | Vous avez le choix de sélectionner un projet existant ou créer un nouveau projet. Nous allons ici décrire la procédure pour la création d’un nouveau projet. | ||
30 | |||
31 | Cliquez alors sur **Créer**. | ||
32 | |||
33 | L’écran suivant permet de définir le projet. Donnez-lui un nom et choisissez son Organisation associée. Cliquez ensuite sur **Créer**. | ||
34 | |||
35 | [[image:google_analytics_connector_config_fr_html_155f00a1906abcb0.png||queryString="width=338&height=315" height="315" width="338"]] | ||
36 | \\Patientez quelques secondes, la création prend quelques instants. | ||
37 | |||
38 | |((( | ||
39 | [[image:google_analytics_connector_config_fr_html_829eaa34e529ef0c.png||queryString="width=72&height=72" height="72" width="72"]] | ||
40 | )))|((( | ||
41 | * La ressource Organisation est la racine dans la hiérarchie des ressources constituant la plate-forme Google Cloud. Un projet est donc défini d’après une Organisation et ce choix est définitif. | ||
42 | ))) | ||
43 | |||
44 | = Activation de l’API Google Analytics = | ||
45 | |||
46 | Rendez-vous sur votre console Google Cloud à l’adresse suivante : | ||
47 | |||
48 | [[https:~~/~~/console.cloud.google.com/projectselector/home/dashboard?supportedpurview=project>>url:https://console.cloud.google.com/projectselector/home/dashboard?supportedpurview=project]] | ||
49 | |||
50 | Sélectionnez le projet tout juste créé. | ||
51 | |||
52 | [[image:google_analytics_connector_config_fr_html_3807c87d3dde122e.png||queryString="width=554&height=177" height="177" width="554"]] | ||
53 | |||
54 | |||
55 | [[image:google_analytics_connector_config_fr_html_7e12dddb270789eb.png||queryString="width=554&height=137" height="137" width="554"]] | ||
56 | |||
57 | Dans le volet de gauche aller à **API et services** > **Bibliothèque** | ||
58 | |||
59 | [[image:google_analytics_connector_config_fr_html_4d718e106b85af0a.png||queryString="width=517&height=188" height="188" width="517"]] | ||
60 | \\Défilez la page pour trouver la section **Autre** > **Analytics API**. Cliquez sur la vignette. | ||
61 | |||
62 | [[image:google_analytics_connector_config_fr_html_7150f2999fb53399.png||queryString="width=417&height=257" height="257" width="417"]] | ||
63 | \\A l’écran suivant, cliquez sur **Activer**. | ||
64 | |||
65 | (% class="wikigeneratedid" id="HCrE9ationd2019uncomptedeserviceetfichierp12" %) | ||
66 | [[image:google_analytics_connector_config_fr_html_e94e1e8ba05a51cb.png||queryString="width=425&height=216" height="216" width="425"]] | ||
67 | |||
68 | |||
69 | = Création d’un compte de service et fichier p12 = | ||
70 | |||
71 | Dans le volet de gauche, aller à **API et services** > **Identifiants**. | ||
72 | |||
73 | [[image:google_analytics_connector_config_fr_html_a16b3d24acff10b1.png||queryString="width=554&height=320" height="320" width="554"]] | ||
74 | \\A l’écran suivant, cliquez sur **Créer des identifiants > Clé de compte de services.** | ||
75 | |||
76 | [[image:google_analytics_connector_config_fr_html_297e3a16080682a2.png||queryString="width=554&height=203" height="203" width="554"]] | ||
77 | \\A l’écran suivant, sélectionnez **Nouveau compte de service **dans le menu déroulant **Compte de service** puis entrez le **Nom de compte de service.** Ceci générera automatiquement un **ID de compte de service **de la forme d’une adresse email (celle-ci se termine par « gserviceaccount.com »). | ||
78 | |||
79 | [[image:google_analytics_connector_config_fr_html_3fce6639d61f07a8.png||queryString="width=554&height=352" height="352" width="554"]] | ||
80 | \\Dans la liste **Rôle**, sélectionnez **Project** > **Propriétaire**. | ||
81 | |||
82 | Dans les options **Type de clé**, choisissez **P12** puis cliquez sur **Créer**. | ||
83 | |||
84 | [[image:google_analytics_connector_config_fr_html_2fb78dccfd7ab812.png||queryString="width=554&height=311" height="311" width="554"]] | ||
85 | \\Le fichier P12 (.p12) se téléchargera automatiquement sur votre machine, sauvegardez-le précieusement. Cliquez sur « **Fermer »**. | ||
86 | |||
87 | [[image:google_analytics_connector_config_fr_html_c70959ee788bce76.png||queryString="width=541&height=205" height="205" width="541"]] | ||
88 | |||
89 | A la page suivant la création de la clé, cliquez sur **Gérer les comptes de service **(à droite). | ||
90 | |||
91 | [[image:google_analytics_connector_config_fr_html_8c722f136a5818d1.png||queryString="width=554&height=212" height="212" width="554"]] | ||
92 | \\Récupérez ensuite l’ID du nouveau compte de service créé (sous forme d’adresse email) : | ||
93 | |||
94 | [[image:google_analytics_connector_config_fr_html_6bff052886516024.png||queryString="width=604&height=118" height="118" width="604"]] | ||
95 | |||
96 | = Liaison du compte de service au compte Google Analytics = | ||
97 | |||
98 | A cette étape nous allons « lier » le compte de service précédemment créé avec notre compte Google Analytics. | ||
99 | |||
100 | Pour cela, connectez-vous sur votre compte Google Analytics en suivant ce lien : | ||
101 | |||
102 | [[https:~~/~~/analytics.google.com/analytics/web/>>url:https://analytics.google.com/analytics/web/]] | ||
103 | |||
104 | Dans le volet de gauche, cliquez sur **Administration** | ||
105 | |||
106 | [[image:google_analytics_connector_config_fr_html_716b6e4d24980190.png||queryString="width=185&height=340" height="340" width="185"]] | ||
107 | \\Cliquez ensuite sur « **Gestion des utilisateurs** » (à gauche, sous « **Compte** ») : | ||
108 | |||
109 | [[image:google_analytics_connector_config_fr_html_c75fd4a5d360493f.png||queryString="width=419&height=218" height="218" width="419"]] | ||
110 | \\Ajoutez l’ID du compte de service (l’ID sous forme d’adresse email) en laissant « **Lire et analyser** » et cliquez sur « **Ajouter** ». | ||
111 | |||
112 | [[image:google_analytics_connector_config_fr_html_1af5551c2fe6fdef.png||queryString="width=605&height=303" height="303" width="605"]] | ||
113 | |||
114 | Attendez quelques instants afin que les changements soient effectifs (environ 3 minutes). | ||
115 | |||
116 | = Récupération de l’identifiant du compte Google Analytics = | ||
117 | |||
118 | C’est cet identifiant qu’il faudra renseigner dans l’interface de DigDash Enterprise. | ||
119 | |||
120 | Rendez-vous sur votre compte Google Analytics en suivant ce lien : | ||
121 | |||
122 | [[https:~~/~~/analytics.google.com/analytics/web/>>url:https://analytics.google.com/analytics/web/]] | ||
123 | |||
124 | Vous pouvez consulter la liste de tous vos comptes Google Analytics en cliquant sur le bouton « Tous les comptes » situé en haut à gauche de la page. | ||
125 | |||
126 | [[image:google_analytics_connector_config_fr_html_46b80af54e0c9e9a.png||queryString="width=310&height=192" height="192" width="310"]] | ||
127 | \\La liste de tous vos comptes Google Analytics apparaît avec leur nom et leur identifiant (première colonne). Noter l’identifiant du compte Google Analytics qui nous intéresse (celui avec lequel le compte de service a été lié). | ||
128 | |||
129 | (% class="wikigeneratedid" id="HConnexionE0GoogleAnalyticsviaDigdashEnterpriseStudio" %) | ||
130 | [[image:google_analytics_connector_config_fr_html_c358c6a641b741b3.png||queryString="width=419&height=160" height="160" width="419"]] | ||
131 | \\Connexion à Google Analytics via Digdash Enterprise Studio | ||
132 | |||
133 | Une fois dans DigDash Enterprise Studio, choisissez une nouvelle source de données Google. | ||
134 | |||
135 | Dans l’interface, renseignez les champs correspondants : | ||
136 | |||
137 | Compte du service : il s’agit de l’identifiant sous forme d’adresse email (dans l’exemple **testaccount@projet-test-155909.iam.gserviceaccount.com**) | ||
138 | |||
139 | Fichier P12 (il s’agit du fichier **.p12** téléchargé lors de la création du compte de service) | ||
140 | |||
141 | Identifiant du compte (il s’agit de l’identifiant récupéré dans Google Analytics, dans l’exemple **64134024**) | ||
142 | |||
143 | Chargez les objets. | ||
144 | |||
145 | [[image:google_analytics_connector_config_fr_html_b0373b24e6711f81.png||queryString="width=450&height=523" height="523" width="450"]] | ||
146 | \\//(la capture est seulement indicative et ne reprend pas obligatoirement les données des exemples précédents)// |