what is the proper way to connect the g gauge track together?
It depends on who made your track and its style. Hollow steel track by Bachmann is held together by a pin that goes into the tube. Solid rail track is held by rail joiners or rail clamps.
Rail clamps are a more secure join.
Chuck