Google analytic code is free & used to track the information about the visitors of your website. Google Analytics is the World’s Most Popular Web Analytics Tool and the small piece of Javascript code. Yes, it is beneficial for SEO because of:-
1.) You will able to know how many hits on your website through the users
2.) Able to identify which pages and links your visitors click the most
3.) You will be able to know how many new visitors come to your site
4.) You will also be able to find out what keywords your visitors type in to find your website.