The Springbok touched down in the first half and added eight points with his boot but Glasgow went into the break 14-13 ahead thanks to a Daniel van der Merwe try and three penalties from Duncan Weir.
But Pienaar knocked over two penalties in the second half while Weir could only reply with one to lift Ulster to the narrow win.
And even though he saw his team come from behind to snatch victory McLaughlin admitted his side still has a lot to improve on.
"We knew it was going to be very competitive and the match turned out to be very tight, Glasgow pushed us hard," he said.
"We are happy with the result but we still have a fair bit to go in terms of performance as we are making too many basic errors.
"We need to hold onto the ball and have to push away from sides when we get our noses in front.
"It's good to get the results but we want to play quality rugby - maybe we are trying too hard to play quality rugby."