What buildings should I place inside a wall?

I'm still experimenting with this, and I believe there are many strategies - but here's what I know so far.

  1. Your Town Hall*. This is pretty straight forward, when keep trophies is your goal - losing it means automatic defeat. Consider upgraded walls around it.
  2. Your collectors and storage tanks. Attackers will target these, as it is one of the key objectives of attacking - to steal resources.
  3. Your defenses. Attackers will target these in order to stop losing troops, and they should be close to your Town Hall/collectors/storage anyway.

* Do note that if resource farming is your goal, you may be better served leaving your Town Hall exposed in order to solicit cheap shields, and distract focus from your storage tanks.

By exclusion, this means that your Barracks, Army Camp, Laboratory, Builder's Hut etc are not essential to be inside the wall. They still count towards your 50% building mark, which can result in a loss - so fit them when you can. They also serve as a good distraction for dumber units like barbarians, so keep that in mind. I have found that savvy players will place certain buildings like builders huts way away from the rest of their camp, to force attack units to hoof it. This can cost attackers valuable time, and may even save you from defeat when your defenses are exhausted.