First, think about what the unit of replication is. This is not a trivial as it sounds (a cage with 3 animals in it is not necessarily n = 3!). A common mistake is to have all members of Group 1 in one cage, and all members of Group 2 in another cage. The unit of replication in this case would be cage, not individual (i.e., one cage would constitute n = 1!). The reason this is important is because the variability within each cage will usually be lower than the variability between each cage. So, any effect that you observe might be an effect of cage, rather than an effect of your treatment.
Steps to follow to ensure balanced allocation to treatment groups:
1. Groups should be age/sex matched as far as is possible.
2. Groups should be formed from multiple families (or original batches of animals), and randomly allocated to treatment groups.
3. If possible, members of each group (e.g., 1 x Group 1 + 1 x Group 2, etc.) should share a cage.
4. Take care when choosing marking substrates as some may interfere with behaviour. If possible, identify individuals by natural markings.
5. If possible, include enrichment devices in cages, as overly standardized environments can adversely affect the outcome of experiments.
6. During the experiment, ensure that all groups have equal exposure to handling/husbandry.
4. Finally, it is a good idea to plan to carry out at least one (preferably more than one) independent replication of the study.