Tesla had and continues to have enormous amounts of marketing. Loads of articles have been written about them; plenty of press generated. Elon Musk, making grandiose claims about self driving gets repeated ad nauseam. All this is marketing.
Actually none of that was a factor for the model s, x, roadster or really even the model 3. In both the former and latter case the viral popularity was fueled by the fact that the products were intrinsically good, although flawed, and filled a gap in their respective markets that was neglected by large corporations. The “Elon musk is just a marketing guru” thing is a super annoying misinformation spread by people who only started paying attention to Tesla and EVs in general after Elon musk became famous.