diff --git a/packages/js/images/yoast-connect-google-site-kit.svg b/packages/js/images/yoast-connect-google-site-kit.svg
new file mode 100644
index 00000000000..ad3bfb2f879
--- /dev/null
+++ b/packages/js/images/yoast-connect-google-site-kit.svg
@@ -0,0 +1,90 @@
+
diff --git a/packages/js/src/dashboard/components/dashboard.js b/packages/js/src/dashboard/components/dashboard.js
index 62f58e02edc..a1b1935a457 100644
--- a/packages/js/src/dashboard/components/dashboard.js
+++ b/packages/js/src/dashboard/components/dashboard.js
@@ -1,5 +1,10 @@
import { Scores } from "../scores/components/scores";
import { PageTitle } from "./page-title";
+import { SiteKitSetupWidget } from "./site-kit-setup-widget";
+import { get } from "lodash";
+import { useCallback } from "@wordpress/element";
+import { useToggleState } from "@yoast/ui-library";
+import { useSelect } from "@wordpress/data";
/**
* @type {import("../index").ContentType} ContentType
@@ -15,12 +20,39 @@ import { PageTitle } from "./page-title";
* @param {Endpoints} endpoints The endpoints.
* @param {Object} headers The headers for the score requests.
* @param {Links} links The links.
+ *
* @returns {JSX.Element} The element.
*/
+// The complexity is cause by the google site kit feature flag which is temporary.
+// eslint-disable-next-line complexity
export const Dashboard = ( { contentTypes, userName, features, endpoints, headers, links } ) => {
+ const siteKitConfiguration = get( window, "wpseoScriptData.dashboard.siteKitConfiguration", {
+ isInstalled: false,
+ isActive: false,
+ isSetupCompleted: false,
+ isConnected: false,
+ installUrl: "",
+ activateUrl: "",
+ setupUrl: "",
+ isFeatureEnabled: false,
+ } );
+ const [ showGoogleSiteKit, , , , setRemoveGoogleSiteKit ] = useToggleState( true );
+ const learnMorelink = useSelect( select => select( "@yoast/general" ).selectLink( "https://yoa.st/google-site-kit-learn-more" ), [] );
+ const handleRemovePermanently = useCallback( ()=>{
+ /* eslint-disable-next-line */
+ // TODO: Implement the remove permanently functionality.
+ setRemoveGoogleSiteKit();
+ }, [ setRemoveGoogleSiteKit ] );
+
return (
<>
+ { showGoogleSiteKit && siteKitConfiguration.isFeatureEnabled && }
{ features.indexables && features.seoAnalysis && (
diff --git a/packages/js/src/dashboard/components/site-kit-setup-widget.js b/packages/js/src/dashboard/components/site-kit-setup-widget.js
new file mode 100644
index 00000000000..8452807de78
--- /dev/null
+++ b/packages/js/src/dashboard/components/site-kit-setup-widget.js
@@ -0,0 +1,139 @@
+import { Button, Paper, Stepper, Title, DropdownMenu } from "@yoast/ui-library";
+import { ReactComponent as YoastConnectSiteKit } from "../../../images/yoast-connect-google-site-kit.svg";
+import { __ } from "@wordpress/i18n";
+import { CheckCircleIcon } from "@heroicons/react/solid";
+import { ArrowRightIcon, XIcon, TrashIcon } from "@heroicons/react/outline";
+
+const steps = [
+ __( "INSTALL", "wordpress-seo" ),
+ __( "ACTIVATE", "wordpress-seo" ),
+ __( "SET UP", "wordpress-seo" ),
+ __( "CONNECT", "wordpress-seo" ),
+];
+
+/**
+ * The google site kit connection guide widget.
+ *
+ * @param {boolean} isInstalled Whether the plugin is installed.
+ * @param {boolean} isActive Whether the feature is active.
+ * @param {boolean} isSetupCompleted Whether the setup is complete.
+ * @param {boolean} isConnected Whether the connection is active.
+ * @param {string} installUrl The URL to install Site Kit.
+ * @param {string} activateUrl The URL to activate Site Kit.
+ * @param {string} setupUrl The URL to setup Site Kit.
+ * @param {function} onRemove The function to call when the widget is removed.
+ * @param {function} onRemovePermanently The function to call when the widget is removed permanently.
+ * @param {string} learnMorelink The URL to learn more about the feature.
+ *
+ * @returns {JSX.Element} The widget.
+ */
+export const SiteKitSetupWidget = ( {
+ installUrl,
+ activateUrl,
+ setupUrl,
+ isConnected,
+ isActive,
+ isSetupCompleted,
+ isInstalled,
+ onRemove,
+ onRemovePermanently,
+ learnMorelink,
+} ) => {
+ const stepsStatuses = [ isInstalled, isActive, isSetupCompleted, isConnected ];
+
+ let currentStep = stepsStatuses.findIndex( status => ! status );
+ const overAllCompleted = currentStep === -1;
+
+ if ( currentStep === -1 ) {
+ currentStep = steps.length - 1;
+ }
+
+ const buttonProps = [
+ {
+ children: __( "Install Site Kit by Google", "wordpress-seo" ),
+ href: installUrl,
+ as: "a",
+ },
+ {
+ children: __( "Activate Site Kit by Google", "wordpress-seo" ),
+ href: activateUrl,
+ as: "a",
+ },
+ {
+ children: __( "Set up Site Kit by Google", "wordpress-seo" ),
+ href: setupUrl,
+ as: "a",
+ },
+ {
+ children: __( "Connect Site Kit by Google", "wordpress-seo" ),
+ },
+ ];
+
+ return
+
+
+
+
+
+ { __( "Remove until next visit", "wordpress-seo" ) }
+
+
+
+ { __( "Remove permanently", "wordpress-seo" ) }
+
+
+
+
+
+
+ { steps.map( ( label, index ) => (
+ { label }
+ ) ) }
+
+
+ { __( "Expand your dashboard with insights from Google!", "wordpress-seo" ) }
+
{ __( "Bring together powerful tools like Google Analytics and Search Console for a complete overview of your website's performance, all in one seamless dashboard.", "wordpress-seo" ) }