For probability sampling, online survey is difficult and tricky, but not impossible. You can try intercept survey if sampling frame is not available. You can get some idea from the attached paper. Hope it helps.
You can do a census survey if you do not have a sampling frame for your study. In that way, you would send your instrument to entire online audience, which would give you more data for your study that you can analyse in a number of ways depending on your research questions.
Depending on the research question that you want to answer - if there is no sampling frame, and you want representivity in your research, then you would need to get stats for the whole population that you are interested in studying. A global population can be tricky, but if it is a staggered sample such as from a specific country, region or 'type' of society, then that may be more useful to get representation of that population. Check out a text by Earl Babbie (2013/ 2015) on The Practice of Social Research (it's the first text that came to mind but there are many others that can advise and answer your question in more detail).