Yes, it is legal to track IP address in Canada but by the Government entities only. The online environment seems to be that Server farms routinely gather specific details about just a visitor to a webpage, such as the user’s Internet Protocol (IP).   All private details generated, retained or acquired by the Federal government is safeguarded by the Canadian Privacy Act.