I usually ask their phone number. Soon. Like within the first day of talking to them. If possible, within the first 10 messages (and most people will say I wait waaaaaay too long if I get to 10)
You can ask fairly simply "so what's your phone number?" or make it more funny. A couple times I tried "so, can I get your digits? I wouldn't want to be found on a dating website at work

"
In one case, this chick was "making me work" for it, so I texted her random crap for like a while, and then when I got over the fun or trolling her I simply said "hey look this is all so fun but if you won't give me your number I am honestly out of here since to me it means you are just here for fun and not interested in meeting anyone". Got the digit. It never went anywhere cause she lived somewhat far from me and logistics were not the best, but still.. sometimes you gotta be ballsy and be ready to lose them.
With all of the above said, if she is interested, she will most likely give it to you. Usually if they don't, it means they don't want to meet you, or maybe they don't want to meet anyone. Be ready for exceptions (I have had one girl who didn't give me the number, but she was totally down to meet, and k-closed her at the end of the night), but most likely no number == no date == no pussy.
Once you get the number, it's no win. Not even a slim win. You need to text/call/SPAM/whatevsapp and ask her out soon. The digits are a small compliance and logistical step to getting her out. Unless you want a texting buddy in the friendzone, that is.