To set up your Google Analytics code on your Portfolio, go to the Portfolio settings page and click on Analytics.
Click on the "Connect Google Analytics" button to start.
Enter your Google Analytics tracking ID.
Note: the ID you require is a universal analytics, UA code.
For more information about this code, visit the Google help article - Set up Analytics for a website (Universal Analytics).
Once that has succeeded you'll see it showing "Connected" as below.