how to avoid chemical pregnancy ?

Ma
Hi, this was our first month ttc, and I think I had a chemical pregnancy
I had about 3 faint lines, one after a 2 day period. I was sure I had conceived but after the bleeding symptoms went away. 
I had major shortness of breath. Anyway, I like to drink coffee but I did reduce a lot, should I just stop ? 
We are a very healthy couple, just wondering what else I can do to have a sticky one. 
Many of my friends get pregnant easily and still drink and everything so I assumed it'll be even easier for me but I guess not ..