Update plugin.js

Fix location issue.
The plugin wasn't triggering the correct path to be sent on page changes - this should fix it.