battery keeps dieing

should be the last one was new it died took it in then they gave me this one and now it died

Charge the battery while unhooked from the car. Let it set for the same period you are saying it takes for it to die. Then hook it up and see what happens. If it dies without being hooked up you have another bad battery.