Agents’ decision whether to join a group, and their subsequent contribution to a public good, depend on the group’s ideals. Agents have different preference for this public good, e.g. reductions in greenhouse gas emissions. People who become “climate insiders” obtain identity utility, but suffer disutility if they deviate from the group ideal. That ideal might create a wide but shallow group, having many members but little effect on behavior, or a narrow but deep group. Greater heterogeneity of preferences causes the contribution-maximizing ideal to create narrow but deep groups. The contribution-maximizing ideal maximizes welfare if the population is large.