On my JK, I knocked off the connector too. I used the defroster repair kit purchased online. Like above, a conducting epoxy. Worked great since then. When it was setting up, I used painters tape to help hold it in place. I never removed the tape after. I think it helped from me catching things on it and ripping it off again.Mine just came loose again. 4500 miles and my second rear glass due to same issue. Looks like Jeep will be replacing it every 2k miles until the warranty expires.
May want to add some type of tape to it. I load and unload hockey bags and sticks from my Jeep all winter, so I know how I did it.