Option 1 - let it be:
I've had players literally sleep on a sofa until the call to "roll initiative" was made, so sometimes, you simply accommodate such players. You could also allow more banter around the table - the story itself progresses more slowly, and the flavor of the game takes on more of a social, hanging with the gang sort of aspect, but the higher degree of social interaction might be what the player needs. The point is, some people simply enjoy the game in different ways than you expect, and this might just be her jam. Don't feel the need to force it if she is enjoying herself (Archer: "phrasing").
Option 2 - forced engagement:
However, if you want "all hands on deck" and you want the story to move along with minimal interruption or diversion, you might need to structure your style so that each player is out of the limelight for a shorter period. Make things more like combat where even during social encounters or exploration, you maintain a loose turn-like approach, so that you don't dwell over-long on any one character and each player's "turn" come up again before they have much chance to become distracted.
Option 3 - be prepared:
Reduce "dead air" where you are digging through rule books or looking up what happens next. By making sure that the game is always progressing and that you are always relaying relevant and interesting information, the dull periods that cause attention to wander are minimized or eliminated, and hopefully you can then keep her attention better. This is perhaps the hardest option, especially if you have little experience as a DM. In this case, you have to have a tightly planned adventure with excellent notes and organization, as well as be well versed in the rules, and even be able to improvise quickly.
Option 4 - ask her:
Ask her what parts of the game keep her attention and which cause her interest to wander. Modify the adventure (or your GMing style) to accommodate her. This is, of course, generally good advice as D&D is a cooperative game at its core, so communication and compromise are essential aspects, but are often forgotten or overlooked. This might take to form of relaxing rules that prohibit players from talking amongst themselves during combat and strategizing (metagaming), or it might be placing more puzzles where players are engaged in more than listening to narration and occasionally rolling a die. It's very likely that by accommodating her needs, you can learn a new skill or tool that makes you better as a GM.
Mix and match:
I list these as options, but chances are, you will get the best results by blending two or more of them. Option 4 is likely the best place to start, and then move on to option 3. Option 2 and 1 don't have to be mutually exclusive, but should be considered as last resorts, or as parts of the other options (maybe 2 and 3 solves 90% of the problem, and you just have to let the remaining 10% be an option 1 sort of thing, or maybe option 2 is a good means of achieving options 3 and 4).
Just like the people that make up individual gaming groups, there is no "one size fits all", so all that can be provided is general advice. Play it by ear, feel out your players (not just the problem player), and try different things, keeping those that work and being unafraid to ditch those that don't - again, communication will be key so that players aren't left confused if things (like rules) keep changing. Let them in on what you are attempting, and let them help if they like - even encourage it.