I am setting up an AEM / Analytics integration and have run into the problem that my staging configuration is being ignored on the staging server - the production configuration is always used. I've gotten around this on the staging server by using putting the incorrect (staging) URL in the production configuration. This prevents staging requests from polluting the data, but isn't ideal. I still have the problem that the production author is not using the staging library.
How does a server determine which of the configurations it should use? I would have guessed run mode, but these are set as expected - using "author", "publish", "stage", and "prod" where applicable.