But, Facebook confirms you that there is actually no way that people can know who viewed their profile. Facebook said:"No, Facebook doesn't currently provide an application that allows people to track profile (timeline) views or statistics on the views of any specific personal content. Third party developers, however, may offer applications that provide some of this functionality."
Now is there any way that you can still have that option ?
Well, yes in order to be tracked by an application, you will need to specifically agree to allow the application to track your actions. That means you will need to allow the app to store your profile stats so that app will track who viewed your profile not Facebook by its own. If you add a such type of application, you will need to be specifically agree to allow the agree to allow the app to track your actions you have made and yes these type of application are just optional. If you do not want them then don't allow them.don't add the application to your account.
In simple words: if you are using the app and your friend is using the app as well, it will track both of you and just show does your friend visited your profile, and to your friend did you visited his profile.