It's feasible with Magento out of the box.
To do so, you need to:
- go to the backend under System > Configuration
- access the Google API under the Sales tab
Imagine store 1 needs Google Analytics.
In the store view dropdown, select store 1:
Confirm the popup by clicking OK.
Now that you're on the store 1 view configuration scope:
- click the Google Analytics section
- Enable: Yes
- Fill the account number with the account related to store 1
- Save Config
Now, let's say you don't want Google Analytics for store 2.
In the store view dropdown, select store 2:
Now that you're on the store 2 view configuration scope:
- click the Google Analytics section
- Enable: No
- Save Config
You can repeat that process for every store you have.