Miley said that to win in front of her family, who were watching from the stands, was a wonderful feeling and made up for the tough year she has had in training.
"It was nice seeing all of my family together and be able to hug all of them," Miley told BBC Sport. "It's been a tough year - I felt training was going well, but racing wasn't great which made me step back and re-evaluate things.
"This was an opportunity to have faith in the system and trust what both me and my dad have done. I've tried to take a lot more ownership of my training and with Aimee Willmott (who came second) coming through I have someone in Britain to push me.
"I've had to sacrifice a lot to focus thoroughly on my sport. It's very hard so to come away and do a lifetime best [made it all worth it]."
Miley's win was Scotland's third gold medal on the opening day in Glasgow.