I found a paper(1) about the 'tail in the mouth' behaviour in the whiptail lizard, Cnemidophorus ocellifer:
Every time that the female moved, the male followed her. During these periods, he often maintained physical contact, covering her hind legs and base of tail region . The male also performed a series of tongue-flicks on the female's back during this activity. During the observation, the female twice executed a sequence of two or three sinuous, figure-eight movements, which were confined to a small area, and after which, the female moved away. After each movement, the male remained motionless for a few moments and then resumed following her while foraging. After 45 minutes and nearly 15 m from their initial positions, the pair entered in dense underbrush, where we could not continue to observe them. 524
While we observed the pair, there was no agonistic encounter between the accompanying male and other males for access or copula with the female.
The paper continues to explain this behaviour as simply a mating strategy:
Two conditional mating strategies have been described for teiid males (<PERSON>-<PERSON> & <PERSON> 2007). 1) In consensual copulations, the male courts the female, slowly circling her for several minutes, then straddling her and copulating; this strategy is often performed by a male companion, and thus is linked to accompaniment. 2) Opportunistic copulations are not preceded by courtship, and are characterized by a male chasing and holding a foraging female, and not accompanying her after copulation (<PERSON>-<PERSON> & <PERSON> 2007).
The 'taping the surface they are on' seems like an attempt to induce vibrations, which is a method of communication.(2)
Some chameleon species communicate with one another by vibrating the substrate that they are standing on, such as a tree branch or leaf. Animals that use vibrational communication exhibit unique adaptations in morphology (i.e., body form) that enable them to detect vibration and use it in communication. These include unique adaptations in ear and jaw morphology that give the animal direct contact with the surface they are standing on, and enable them to detect subtle vibrations. Lizards that live on substrates that can be easily moved (such as thin tree branches or leaves) are probably more likely to use vibrational communication than lizards that live on substrates that do not transmit vibrations as easily, such as the ground or thick tree trunks.
1- https://www.scielo.br/scielo.php?script=sci_arttext&pid=S1676-06032011000400031#:~:text=The%20most%20commonly%20reported%20mating,Bull%202000%2C%20Ribeiro%20et%20al.
2- https://en.wikipedia.org/wiki/Lizard_communication 524