How to drag sprite on a path?

How to drag sprite on a path like there https://cdn-factory.marketjs.com/en/mcdonalds-playable-ad/index.html ?

Thanks a lot!