I have a weird redirection virus
hello I have been noticing that I have been redirected so many times in a short period of time and when I am on safari it redirects me to random advertisement pages, whilst it redirect me it goes through multiple links, I think I saw "ip track" on one link. I have tried everything I know to get rid of this, I have tried the free Bitdefender virus scanner, It scanned a few documents and showed it had viruses so then I thought It was over, I loaded up safari and the same thing happened, I really don't know what to do, somebody please help.
thanks
MacBook Pro (13-inch, 2017, 2 TBT3), macOS High Sierra (10.13.6), null