Affiliate plugin not counting purchases

I have the affiliate plugin installed with Membership 2 Pro. When someone visits the site via an affiliate link, the visit is tracked, but when someone purchases a membership. that isn't tracked (which is kinda the point). Can someone help me troubleshoot this?