To submit a ping to an in-world location, first call C_PingSecure.GetTargetWorldPing with the screen position to place the ping at. If it returns true, call this function with the target parameter omitted or set to nil.
To submit a ping that will display over a unit, the target parameter must be a valid unit GUID.
Pings for units only support a limited subset of unit types. Creatures, Pets, Players, and Vehicles can all be pinged, but GameObjects such as gathering nodes and treasure chests cannot.