Added in a better way to detect the Dojo environment and automatically pull the needed variables for image tracking.