<address>
  <p>{{ contact.trans_title }}<br>
  {% if contact.map_url %}
    <a href="{{ contact.map_url }}">{{ contact.address }}</a>
  {% else %}
    {{ contact.address }}
  {% endif %}
  </p>
  <p>Tel. <a href="{{ contact.phone_link }}">{{ contact.phone }}</a><br>
  <a href="{{ contact.email_link }}">{{ contact.email }}</a><br>
  <a href="{{ contact.www }}">{{ contact.www_domain }}</a></p>
</address>

<div class="social-networks">
{% for sc in socials %}
  <a href="{{ sc.network_url }}" target="_blank" title="{{ sc.network_title }}"
     style="background-image:url(/static/images/social/{{ sc.network }}.png)">
     {{ sc.network_title }}</a>
{% endfor %}
</div>

{% if contact.is_google_analytics %}
<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
  ga('create', '{{ contact.analytics }}', 'auto');
  ga('send', 'pageview');
</script>
{% elif contact.get_piwik_analytics %}
<script type="text/javascript">
  var _paq = _paq || [];
  _paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
  _paq.push(["setCookieDomain", document.domain]);
  _paq.push(["setDomains", [document.domain,"*." + document.domain]]);
  _paq.push(['trackPageView']);
  _paq.push(['enableLinkTracking']);
  (function() {
    var u="//{{ contact.get_piwik_analytics.server }}";
    _paq.push(['setTrackerUrl', u+'piwik.php']);
    _paq.push(['setSiteId', {{ contact.get_piwik_analytics.site }}]);
    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
    g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
  })();
</script>
{% endif %}
