{"id":37843,"date":"2017-01-31T00:00:48","date_gmt":"2017-01-30T23:00:48","guid":{"rendered":"https:\/\/www.seopress.org\/fr\/?post_type=documentation&#038;p=37843"},"modified":"2024-08-09T10:04:22","modified_gmt":"2024-08-09T08:04:22","slug":"connectez-votre-site-wordpress-a-google-analytics","status":"publish","type":"documentation","link":"https:\/\/www.seopress.org\/fr\/support\/guides\/connectez-votre-site-wordpress-a-google-analytics\/","title":{"rendered":"Connectez votre site WordPress \u00e0 Google Analytics"},"content":{"rendered":"<div class=\"alert alert-primary\"><a href=\"https:\/\/www.seopress.org\/fr\/extensions-seo-wordpress\/seopress-pro\/\"><strong>SEOPress PRO<\/strong><\/a> est n\u00e9cessaire pour voir vos statistiques <strong>Google Analytics<\/strong> depuis votre tableau de bord WordPress.<\/div>\n<p><iframe loading=\"lazy\" title=\"Connect your WordPress site with Google Analytics\" width=\"856\" height=\"482\" src=\"https:\/\/www.youtube.com\/embed\/GOQ2zgQHkq0?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<p><span style=\"color: #ff0000;\"><strong>Avant toutes choses, assurez vous d&rsquo;avoir d\u00e9sactiv\u00e9 tout logiciel antivirus sur votre machine (Bitdefender, Kaspersky, Norton&#8230;) pour \u00e9viter tout blocage \/ conflit durant la liaison entre Google Console et votre site. R\u00e9activez les apr\u00e8s avoir suivi ce guide.<\/strong><\/span><\/p>\n<h2>Connectez-vous \u00e0 Google Cloud Console<\/h2>\n<p>Pour cela, nous nous connectons \u00e0 l&rsquo;API de <strong>Google Analytics<\/strong> et effectuons des appels pour obtenir les donn\u00e9es avec un <strong>ID Client et un ID Secret.<\/strong><\/p>\n<p>Pour g\u00e9n\u00e9rer vos identifiants, vous devez vous connecter \u00e0 <a href=\"https:\/\/console.developers.google.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">Google Console<\/a>.<\/p>\n<p><em>Notez que vous devez au pr\u00e9alable cr\u00e9er un projet Google Console avant de pouvoir suivre ce tutoriel. <a href=\"https:\/\/cloud.google.com\/resource-manager\/docs\/creating-managing-projects\" target=\"_blank\" rel=\"noopener noreferrer\">Plus d&rsquo;informations sur la doc officielle<\/a>.<\/em><\/p>\n<h2>Activez les APIs Google n\u00e9cessaires<\/h2>\n<p>Dans le <strong>Gestionnaire d&rsquo;API<\/strong>, choisissez <strong>Biblioth\u00e8que<\/strong>, recherchez et activez les APIs list\u00e9es ci-dessous (il est primordial de s\u00e9lectionner les bonnes APIs) :<\/p>\n<ul>\n<li><strong>Google Analytics API<\/strong><\/li>\n<li><strong>Google Analytics Data API<\/strong><\/li>\n<\/ul>\n<figure id=\"attachment_18063\" aria-labelledby=\"figcaption_attachment_18063\" class=\"wp-caption alignnone\" ><a href=\"https:\/\/www.seopress.org\/fr\/wp-content\/uploads\/sites\/2\/2020\/02\/google-analytics-api-2.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-18063\" src=\"https:\/\/www.seopress.org\/fr\/wp-content\/uploads\/sites\/2\/2020\/02\/google-analytics-api-2.jpg\" alt=\"Google Analytics API\" width=\"617\" height=\"610\" srcset=\"https:\/\/www.seopress.org\/fr\/wp-content\/uploads\/sites\/2\/2020\/02\/google-analytics-api-2.jpg 1300w, https:\/\/www.seopress.org\/fr\/wp-content\/uploads\/sites\/2\/2020\/02\/google-analytics-api-2-768x759.jpg 768w, https:\/\/www.seopress.org\/fr\/wp-content\/uploads\/sites\/2\/2020\/02\/google-analytics-api-2-128x128.jpg 128w\" sizes=\"auto, (max-width: 617px) 100vw, 617px\" \/><\/a><figcaption id=\"figcaption_attachment_18063\" class=\"wp-caption-text mt-3 mb-5 fst-italic\">Google Analytics API<\/figcaption><\/figure>\n<figure id=\"attachment_57679\" aria-labelledby=\"figcaption_attachment_57679\" class=\"wp-caption alignnone\" ><a href=\"https:\/\/www.seopress.org\/fr\/wp-content\/uploads\/sites\/2\/2017\/01\/google-analytics-data-api.png\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-57679\" src=\"https:\/\/www.seopress.org\/fr\/wp-content\/uploads\/sites\/2\/2017\/01\/google-analytics-data-api.png\" alt=\"Google Analytics Data API - Cloud Console\" width=\"610\" height=\"231\" srcset=\"https:\/\/www.seopress.org\/fr\/wp-content\/uploads\/sites\/2\/2017\/01\/google-analytics-data-api.png 1336w, https:\/\/www.seopress.org\/fr\/wp-content\/uploads\/sites\/2\/2017\/01\/google-analytics-data-api-768x291.png 768w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/a><figcaption id=\"figcaption_attachment_57679\" class=\"wp-caption-text mt-3 mb-5 fst-italic\">Google Analytics Data API &#8211; Cloud Console<\/figcaption><\/figure>\n<p>Puis cliquez sur le bouton <strong>G\u00e9rer<\/strong>.<\/p>\n<h2>Cr\u00e9er l&rsquo;\u00e9cran de consentement OAuth<\/h2>\n<div class=\"alert alert-info\">En fonction de vos param\u00e8tres actuels, si vous n&rsquo;obtenez pas cet \u00e9cran, passez \u00e0 l&rsquo;\u00e9tape suivante \u00ab\u00a0<strong>Cr\u00e9ez vos identifiants<\/strong>\u00ab\u00a0.<\/div>\n<p>Choisissez \u00ab\u00a0<strong>Externe<\/strong>\u00a0\u00bb et cliquez sur le bouton <strong>Cr\u00e9er<\/strong>.<\/p>\n<figure id=\"attachment_65312\" aria-labelledby=\"figcaption_attachment_65312\" class=\"wp-caption alignnone\" ><a href=\"https:\/\/www.seopress.org\/fr\/wp-content\/uploads\/sites\/2\/2017\/01\/google-analytics-google-cloud-user-consent-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-65312\" src=\"https:\/\/www.seopress.org\/fr\/wp-content\/uploads\/sites\/2\/2017\/01\/google-analytics-google-cloud-user-consent-1.png\" alt=\"\u00c9cran de consentement OAuth - Google Cloud Console\" width=\"1920\" height=\"839\" srcset=\"https:\/\/www.seopress.org\/fr\/wp-content\/uploads\/sites\/2\/2017\/01\/google-analytics-google-cloud-user-consent-1.png 1920w, https:\/\/www.seopress.org\/fr\/wp-content\/uploads\/sites\/2\/2017\/01\/google-analytics-google-cloud-user-consent-1-768x336.png 768w, https:\/\/www.seopress.org\/fr\/wp-content\/uploads\/sites\/2\/2017\/01\/google-analytics-google-cloud-user-consent-1-1536x671.png 1536w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><\/a><figcaption id=\"figcaption_attachment_65312\" class=\"wp-caption-text mt-3 mb-5 fst-italic\">\u00c9cran de consentement OAuth &#8211; Google Cloud Console<\/figcaption><\/figure>\n<p>\u00c0 la premi\u00e8re \u00e9tape, remplissez tous les champs obligatoires. Les valeurs n&rsquo;ont pas vraiment d&rsquo;importance. Vous seul les verrez lors de la connexion entre votre site WP et votre compte Google Cloud.<\/p>\n<ul>\n<li><strong>Nom de l&rsquo;application<\/strong><\/li>\n<li><strong>E-mail d&rsquo;assistance aux utilisateurs<\/strong><\/li>\n<li><strong>Adresse e-mail du d\u00e9veloppeur<\/strong><\/li>\n<\/ul>\n<p>Cliquez sur le bouton <strong>Enregistrer et continuer<\/strong>.<\/p>\n<p>\u00c0 la deuxi\u00e8me \u00e9tape, ne changez rien et cliquez sur le bouton <strong>Enregistrer et continuer<\/strong>.<\/p>\n<p>Idem pour la troisi\u00e8me \u00e9tape.<\/p>\n<p>\u00c0 la derni\u00e8re \u00e9tape, cliquez sur <strong>Retour au tableau de bord<\/strong> pour continuer avec l&rsquo;\u00e9tape de cr\u00e9ation des identifiants.<\/p>\n<figure id=\"attachment_65313\" aria-labelledby=\"figcaption_attachment_65313\" class=\"wp-caption alignnone\" ><a href=\"https:\/\/www.seopress.org\/fr\/wp-content\/uploads\/sites\/2\/2017\/01\/google-analytics-google-cloud-user-consent-2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-65313\" src=\"https:\/\/www.seopress.org\/fr\/wp-content\/uploads\/sites\/2\/2017\/01\/google-analytics-google-cloud-user-consent-2.png\" alt=\"Premi\u00e8re \u00e9tape pour cr\u00e9er l'\u00e9cran de consentement OAuth\u00a0\u2013\u00a0Google Cloud\u00a0Console\" width=\"1920\" height=\"1200\" srcset=\"https:\/\/www.seopress.org\/fr\/wp-content\/uploads\/sites\/2\/2017\/01\/google-analytics-google-cloud-user-consent-2.png 1920w, https:\/\/www.seopress.org\/fr\/wp-content\/uploads\/sites\/2\/2017\/01\/google-analytics-google-cloud-user-consent-2-768x480.png 768w, https:\/\/www.seopress.org\/fr\/wp-content\/uploads\/sites\/2\/2017\/01\/google-analytics-google-cloud-user-consent-2-1536x960.png 1536w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><\/a><figcaption id=\"figcaption_attachment_65313\" class=\"wp-caption-text mt-3 mb-5 fst-italic\">Premi\u00e8re \u00e9tape pour cr\u00e9er l&rsquo;\u00e9cran de consentement OAuth\u00a0\u2013\u00a0Google Cloud\u00a0Console<\/figcaption><\/figure>\n<h2>Cr\u00e9ez vos identifiants<\/h2>\n<p>Depuis le menu de gauche, cliquez sur <strong>Identifiants<\/strong> (ne cliquez pas sur le bouton Cr\u00e9ez des identifiants situ\u00e9 \u00e0 droite).<\/p>\n<figure id=\"attachment_18064\" aria-labelledby=\"figcaption_attachment_18064\" class=\"wp-caption alignnone\" ><a href=\"https:\/\/www.seopress.org\/fr\/wp-content\/uploads\/sites\/2\/2020\/02\/google-analytics-manage-api.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-18064\" src=\"https:\/\/www.seopress.org\/fr\/wp-content\/uploads\/sites\/2\/2020\/02\/google-analytics-manage-api.jpg\" alt=\"Google Analytics Manage API\" width=\"1200\" height=\"772\" srcset=\"https:\/\/www.seopress.org\/fr\/wp-content\/uploads\/sites\/2\/2020\/02\/google-analytics-manage-api.jpg 1200w, https:\/\/www.seopress.org\/fr\/wp-content\/uploads\/sites\/2\/2020\/02\/google-analytics-manage-api-768x494.jpg 768w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><figcaption id=\"figcaption_attachment_18064\" class=\"wp-caption-text mt-3 mb-5 fst-italic\">Google Analytics Manage API<\/figcaption><\/figure>\n<p>Dans <strong>Identifiants<\/strong>, cliquez sur <strong>Cr\u00e9er des\u00a0<\/strong><b>identifiants<\/b>\u00a0(bouton bleu), et choisissez <strong>ID client OAuth<\/strong>.<\/p>\n<ul>\n<li>Choisissez <strong>Application web<\/strong>,<\/li>\n<li>saisissez un nom comme <strong>Google Analytics SEOPress,<br \/>\n<\/strong><\/li>\n<li>puis votre\/vos noms de domaine complets dans <strong>Origines Javascript Autoris\u00e9es<\/strong> <span style=\"color: #ff0000;\">(remplacer par votre propre nom de domaine)<\/span> :<br \/>\n<code>https:\/\/www.example.com<\/code><\/li>\n<li>et enfin, l&rsquo;URI de redirection sous cette forme <span style=\"color: #ff0000;\">(remplacer par votre propre nom de domaine)<\/span> :<br \/>\n<code>https:\/\/www.example.com\/wp-admin\/admin.php?page=seopress-google-analytics<\/code><\/li>\n<li>et faites <strong>Cr\u00e9er<\/strong>.<\/li>\n<\/ul>\n<figure id=\"attachment_18065\" aria-labelledby=\"figcaption_attachment_18065\" class=\"wp-caption alignnone\" ><a href=\"https:\/\/www.seopress.org\/fr\/wp-content\/uploads\/sites\/2\/2020\/02\/google-analytics-manage-api-credentials.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-18065\" src=\"https:\/\/www.seopress.org\/fr\/wp-content\/uploads\/sites\/2\/2020\/02\/google-analytics-manage-api-credentials.jpg\" alt=\"Google Analytics Manage - cr\u00e9ation des identifiants, ex avec seopress.org\" width=\"850\" height=\"723\" srcset=\"https:\/\/www.seopress.org\/fr\/wp-content\/uploads\/sites\/2\/2020\/02\/google-analytics-manage-api-credentials.jpg 850w, https:\/\/www.seopress.org\/fr\/wp-content\/uploads\/sites\/2\/2020\/02\/google-analytics-manage-api-credentials-768x653.jpg 768w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/a><figcaption id=\"figcaption_attachment_18065\" class=\"wp-caption-text mt-3 mb-5 fst-italic\">Google Analytics Manage &#8211; cr\u00e9ation des identifiants, ex avec seopress.org<\/figcaption><\/figure>\n<p><span style=\"color: #ff0000;\"><em><strong>Si votre nom de domaine est SANS \u00ab\u00a0www\u00a0\u00bb, alors n&rsquo;entrez PAS \u00ab\u00a0www\u00a0\u00bb dans les champs Authorized JavaScripts et Redirect URI fields.<\/strong><\/em><\/span><\/p>\n<p><em>Notez qu&rsquo;avant de cliquer sur <strong>Cr\u00e9er<\/strong>, assurez vous que les 2 URLs sont sauvegard\u00e9es par Google. Lorsque vous entrez votre URL, <strong>cliquez en dehors du champ pour la valider<\/strong>.<\/em><\/p>\n<figure id=\"attachment_16371\" aria-labelledby=\"figcaption_attachment_16371\" class=\"wp-caption alignnone\" ><a href=\"https:\/\/www.seopress.org\/fr\/wp-content\/uploads\/sites\/2\/2019\/12\/seopress-google-analytics-api-fr.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-16371\" src=\"https:\/\/www.seopress.org\/fr\/wp-content\/uploads\/sites\/2\/2019\/12\/seopress-google-analytics-api-fr.jpg\" alt=\"Google Console Analytics API\" width=\"1400\" height=\"1129\" srcset=\"https:\/\/www.seopress.org\/fr\/wp-content\/uploads\/sites\/2\/2019\/12\/seopress-google-analytics-api-fr.jpg 1400w, https:\/\/www.seopress.org\/fr\/wp-content\/uploads\/sites\/2\/2019\/12\/seopress-google-analytics-api-fr-768x619.jpg 768w\" sizes=\"auto, (max-width: 1400px) 100vw, 1400px\" \/><\/a><figcaption id=\"figcaption_attachment_16371\" class=\"wp-caption-text mt-3 mb-5 fst-italic\">Google Console Analytics API<\/figcaption><\/figure>\n<p>Puis copiez-collez l&rsquo;<strong>ID Client<\/strong> et l&rsquo;<strong>ID Secret<\/strong> depuis la popup vers votre <strong>admin WordPress, SEOPress, Google Analytics, Stats dans le Tableau de bord, Google Console Client ID\/Google Console Secret ID.<\/strong><\/p>\n<p><strong>Assurez vous de copier coller correctement ces codes sans espace au d\u00e9but et en fin de s\u00e9lection afin d&rsquo;\u00e9viter une erreur.<\/strong><\/p>\n<p>N&rsquo;oubliez pas de <strong>sauvegarder<\/strong>.<\/p>\n<p>Vous pouvez ensuite cliquer sur <strong>Connecter avec Google Analytics<\/strong>, <strong>Autoriser la liaison<\/strong> et voil\u00e0 !<\/p>\n<h2>Erreur 403: access_denied<\/h2>\n<p>Si vous obtenez cette erreur\u00a0: \u00ab\u00a0<strong>Le d\u00e9veloppeur ne vous a pas donn\u00e9 acc\u00e8s \u00e0 cette application. Elle est actuellement test\u00e9e et n&rsquo;a pas \u00e9t\u00e9 v\u00e9rifi\u00e9e par Google.<\/strong>\u00ab\u00a0, assurez-vous d&rsquo;utiliser le m\u00eame compte Google pour Analytics et Cloud\u00a0Console.<\/p>\n<p>Si ce n&rsquo;est pas possible, vous devrez cr\u00e9er un compte de service depuis Cloud Console puis ajouter l&rsquo;e-mail g\u00e9n\u00e9r\u00e9 \u00e0 votre compte Google Analytics.<\/p>\n<p>Ce guide explique cette proc\u00e9dure pour l&rsquo;API d&rsquo;indexation mais c&rsquo;est exactement la m\u00eame chose\u00a0:<\/p>\n<p><a href=\"https:\/\/www.seopress.org\/support\/guides\/google-indexing-api-with-seopress\/\">https:\/\/www.seopress.org\/support\/guides\/google-indexing-api-with-seopress\/<\/a><\/p>\n<p>Si l&rsquo;erreur persiste, essayez de suivre cette vid\u00e9o\u00a0:<\/p>\n<p><iframe loading=\"lazy\" title=\"Fix Google OAuth Error 403: access_denied in in 3 minutes #googleoauth #oauth\" width=\"856\" height=\"482\" src=\"https:\/\/www.youtube.com\/embed\/x_NPvk0pk8g?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<h2>Erreur 400 : URI redirect mismatch (non-concordance de la redirection URI)<\/h2>\n<p>Si vous obtenez cette erreur lorsque vous essayez de vous connecter \u00e0 votre propre application Google Cloud, cela signifie que vous n&rsquo;avez pas correctement configur\u00e9 les <strong>origines JavaScripts autoris\u00e9es<\/strong> et\/ou l&rsquo;<strong>URI de redirection<\/strong> autoris\u00e9e \u00e0 l&rsquo;\u00e9tape \u00ab <a href=\"https:\/\/www.seopress.org\/fr\/support\/guides\/connectez-votre-site-wordpress-a-google-analytics\/#creez-vos-identifiants\">Cr\u00e9er vos identifiants<\/a> \u00bb.<\/p>\n<p>Assurez-vous d&rsquo;utiliser votre propre nom de domaine. Si votre domaine commence par <code>www<\/code>, vous devez \u00e9galement l&rsquo;inclure.<\/p>\n<p><a href=\"https:\/\/www.seopress.org\/fr\/wp-content\/uploads\/sites\/2\/2019\/12\/seopress-google-analytics-api-fr.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-16371\" src=\"https:\/\/www.seopress.org\/fr\/wp-content\/uploads\/sites\/2\/2019\/12\/seopress-google-analytics-api-fr.jpg\" alt=\"Google Console Analytics API\" width=\"1400\" height=\"1129\" srcset=\"https:\/\/www.seopress.org\/fr\/wp-content\/uploads\/sites\/2\/2019\/12\/seopress-google-analytics-api-fr.jpg 1400w, https:\/\/www.seopress.org\/fr\/wp-content\/uploads\/sites\/2\/2019\/12\/seopress-google-analytics-api-fr-768x619.jpg 768w\" sizes=\"auto, (max-width: 1400px) 100vw, 1400px\" \/><\/a><\/p>\n","protected":false},"featured_media":0,"parent":0,"template":"","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","_relevanssi_hide_post":"","_relevanssi_hide_content":"","_relevanssi_pin_for_all":"","_relevanssi_pin_keywords":"","_relevanssi_unpin_keywords":"","_relevanssi_related_keywords":"","_relevanssi_related_include_ids":"","_relevanssi_related_exclude_ids":"","_relevanssi_related_no_append":"","_relevanssi_related_not_related":"","_relevanssi_related_posts":"","_relevanssi_noindex_reason":"","editor_notices":[],"footnotes":""},"class_list":{"0":"post-37843","1":"documentation","2":"type-documentation","3":"status-publish","5":"documentation_type-guides","6":"product-seopress-pro"},"acf":[],"_links":{"self":[{"href":"https:\/\/www.seopress.org\/fr\/wp-json\/wp\/v2\/documentation\/37843","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.seopress.org\/fr\/wp-json\/wp\/v2\/documentation"}],"about":[{"href":"https:\/\/www.seopress.org\/fr\/wp-json\/wp\/v2\/types\/documentation"}],"version-history":[{"count":0,"href":"https:\/\/www.seopress.org\/fr\/wp-json\/wp\/v2\/documentation\/37843\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.seopress.org\/fr\/wp-json\/wp\/v2\/media?parent=37843"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}