I've done this a couple of times both ways. It's really pretty easy. You need to get the entire assembly, which includes the forward window track, complete with the felt weatherstripping. It attaches at the bottom with a bolt (you must take the door panel off), and at the top with two small screws that come down through the top of the door frame. No rivets that I'm aware of. If you're u-pulling, try also to get the outside "belt molding" that goes against the main glass, because that will provide you with a spare, and also a hands-on lesson on how to remove it properly.
Now, with the window down, you can tilt the top of the assembly aft, and then pull it up out of the door. At the very end, you have to work the tab at the bottom of the channel past the corner of the window (that is why you have to remove the belt molding mentioned above). Assembly is the reverse - just make sure that you push the assembly far enough forward, and that none of the rubber lips are tucked under.
Once it's in, you can align it a little with the top screws, and when it's all together you can loosen the screw that holds the top hinge to the glass, and move the glass a little forward or back to improve the seal. If the latch assembly is loose on the glass, you can remove the tiny roll pin that holds the latch handle on. Don't lose the latch button or the spring under it, or the wavy washer that goes under the handle. The post is hollow, and has a phillips screw inside to tighten it.
A little silicone grease on the gasket where it mates with the glass can help prevent leaks. Once it's well-aligned and snug, the gasket will sometimes relearn its correct position and seal better.
When shopping the boneyard for windows, be aware that a common failure of these is that the bottom pivot post will come loose from the frame of the glass, and instead of the window turning the post against the spring and washers in the outer frame, the glass will just turn against the post. Don't get any window that flops open loosely.