Get configuration from environment

This required a rewrite of the ExternalLinkTrackerHandler function so
that it just read from the global variables.