Track which plan or widget was purchased through my link

We’d like to have an option to track which plan or widget was purchased through my link