When I taught my dogs to ride in the Radio Flyer wagon, it took a LOT of practice.

I would work in small steps with lots of treats (my dogs were used to clicker training).

I would make the trailer the most reinforcing place in the universe, with toys and treats and attention for staying put. I'd also make sure you travel to happy, fun places and events in the trailer, at least at first.