It seems you might create one invite link for each source (ad, group of ads) and track stats for each link.
You might get these stats via TG API getChatInviteLinks and getChatInviteLinkMembers, or via a TG app UI where you could see users joined by a specific link: