How to set it up for sub directory

I am using the subdirectory method of mult-site, with buddypress.

How to I set up Google Analytics? Google Analytics only provides an option for subdomains, but not sub directories.

Also, where do I paste the code in my site?

Dustin