cranberry is effective, yes. I wouldn't give it in juice form though. juice is high in sugar and calories (and honestly, I don't know many dogs who'd like the taste of it)
there are other ways to get the benefits of cranberry. supplements and foods that contain natural cranberry extract would be a better idea than juice. For appropriate dosing and what types would be best your pet, I'd suggest speaking with a homeopathic vet.
Personally I think the best way to keep UTIs under control is ample clean, fresh, cold water available, and frequent potty breaks.