+# Retrieve piwik information
+try:
+ _host = urlparse.urlsplit(settings.PIWIK_URL).netloc
+except AttributeError:
+ logger.debug("PIWIK_URL not configured.")
+ _host = None
+try:
+ _id_piwik = PiwikSite.objects.get(site=Site.objects.get_current().id).id_site
+except PiwikSite.DoesNotExist:
+ logger.debug("No PiwikSite is configured.")
+ _id_piwik = None
+