Table of contents
Researchers have succeeded in digitally reconstructing the fossil cloaca of a Psittacosaurus This allowed the conclusion that these prehistoric giants possibly attracted partners by smell and sight. However, let's go in parts.
First of all, a cloaca is an organ that is present in most reptiles and birds. This portion of the body serves as the final part of the digestive system, making the excretion of urine and feces. Moreover, the cloaca has reproductive function, that is, it is through it that occurs the transfer of spermatozoa from males to females. Fact is that dinosaurs also had cloacae, andresearchers found a fossil of this organ from a Psittacosaurus (a dinosaur of less than 1 meter, from the Cretaceous period) in great condition.
Jakob Vinther, a researcher at the University of Bristol and author of the paper, first observed in 2016 that the cloaca of Psittacosaurus could have allocated glands, possibly to exude biochemical compounds that attracted partners.
More recently, Vinther has observed evidence of large amounts of melanin on the outside of the dinosaur's cloaca. If present internally, melanin might have helped prevent infection. However, the presence of this molecule on the outside of the cloaca might suggest something different. It might be an indication that visual stimulation, i.e. vibrant colors, also attracted partners.

Jakob Vinther, Current Biology, 2021
Did other dinosaurs attract partners in the same way?
As the author himself points out, his conclusions were only possible due to the state of conservation of the fossil. This is because no other dinosaur cloaca has as many preserved details as the one in question. Therefore, it is possible to extrapolate and say that other dinos also used this attraction mechanism.
In fact, there is evidence that other dinosaurs may have used vibrant colors to attract attention from partners. However, the assumption that all dinosaurs behaved like dogs when attracting partners is still very preliminary.
The article is available in the journal Current Biology.