utils.build_ga_params assumes that the google_analytics_id is a global setting. However, if an django project uses Sites or otherwise supports more than one site, there may be more than one google_analytics_id. How about checking the request for a google_analytics_id attribute (optionally set by some other middleware) and if it exists, using that instead of settings?