One of the reasons that certain advertisements are successful is because viewers want to behave like those they observe. What is the general term that psychologists use to describe this type of behavior?

It's one of these.

http://library.thinkquest.org/C0111500/proptech.htm

The behavior of those observed is called modeling. The viewers identify with the model, identification, and therefore imitate the model, imitation.

The general term that psychologists use to describe the behavior of individuals imitating or wanting to imitate others is "social mimicry."

To understand this term, it's important to recognize that humans are social creatures who often look to others for cues on how to behave or what is considered desirable. This behavior can manifest in various ways, such as imitating the actions, attitudes, or lifestyle choices of influential individuals or groups.

In the context of advertising, social mimicry is a psychological phenomenon where viewers are influenced by the behavior or attributes of the individuals portrayed in the advertisements. When people see others engaging in certain behaviors, possessing certain products, or being associated with a particular brand, they may be motivated to imitate or adopt similar behaviors and attitudes. Advertisements often leverage this tendency by featuring relatable and aspirational figures that viewers want to emulate.

Studying social mimicry can provide valuable insights into consumer behavior and the effectiveness of advertising and marketing strategies. By understanding the underlying psychology of why people mimic others, advertisers can create targeted campaigns that tap into these motivations and drive desired consumer actions.