I have no experience of using this, but had a quick look at the docs and will see if I can help.
As you can read, mixpanel.track_links has two required parameters:
css_selector:string - A valid CSS selector that matches the link(s) you want to track, preferably an ID.
event_name:string - The name of the event to send when a link is clicked. This can be anything you want, like “clicked header link” or “footer link click”.
Regarding the first parameter, might it be the case that you have to add the id to the anchor tag itself, as opposed to its parent div?