How to add a filter conditionally based on page related Conditional Tags

The conditional tags must be run after WP object is set up. The wp action hook is the first one where you can use these conditionals safely. See the warning message in the conditional tags documentation.

So, you should hook into wp action or later event; also, the correct function name is add_action, not add_Action:

add_action('wp', 'determine_location');