To add Google Analytics code to the Yoast plugin, follow these steps:First, make sure you have a Google Analytics account and have access to the tracking code.
Log in to your WordPress website using your administrator credentials.
In the WordPress dashboard, locate the "SEO" menu item on the left-hand side and hover over it to expand the submenu.
From the submenu, click on "General."
Once inside the "SEO" settings, select the "Features" tab.