Commit e6ab2a80 authored by Mathieu Courcelles's avatar Mathieu Courcelles

Adds Piwik variables

parent 60702c96
Pipeline #12729259 canceled with stage
......@@ -177,6 +177,7 @@ TEMPLATE_CONTEXT_PROCESSORS = (
'django.core.context_processors.request',
'django.core.context_processors.i18n',
'django.contrib.messages.context_processors.messages',
'django_settings_export.settings_export',
)
INSTALLED_APPS = (
......@@ -237,3 +238,10 @@ GRAPPELLI_ADMIN_TITLE = 'CLMSVault - Protein cross-linking mass spectrometry ana
GRAPPELLI_INDEX_DASHBOARD = 'CLMSVault.dashboard.CustomIndexDashboard'
PIWIK_SITEID = os.getenv('PIWIK_SITEID')
PIWIK_URL = os.getenv('PIWIK_SITEID')
SETTINGS_EXPORT = [
'PIWIK_SITEID',
'PIWIK_URL',
]
\ No newline at end of file
Django==1.7
MySQL-python==1.2.5
django-grappelli==2.6.1
django-settings-export==1.2.1
Unipath==1.0
biopython==1.64
numpy==1.9.1
......
......@@ -68,44 +68,23 @@
<!-- EXTRAHEAD -->
{% block extrahead %}{% endblock %}
{% if site|inhouseSite %}
{% if demo|demoSite %}
<!-- Piwik -->
<script type="text/javascript">
var _paq = _paq || [];
_paq.push(["setDomains", ["*.democlmsvault.iric.ca","*.democlmsvault.tyerslab.com"]]);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="https://thip87-iric.iric.ca:9001/";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', '5']);
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>
<noscript><p><img src="https://thip87-iric.iric.ca:9001/piwik.php?idsite=5" style="border:0;" alt="" /></p></noscript>
<!-- End Piwik Code -->
{% else %}
<!-- Piwik -->
<script type="text/javascript">
var _paq = _paq || [];
_paq.push(["setDomains", ["*.clmsvault.tyerslab.com","*.clmsvault.iric.ca"]]);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="https://thip87-iric.iric.ca:9001/";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', '2']);
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>
<noscript><p><img src="https://thip87-iric.iric.ca:9001/piwik.php?idsite=2" style="border:0;" alt="" /></p></noscript>
<!-- End Piwik Code -->
{% endif %}
{% if settings.PIWIK_SITEID %}
<!-- Piwik -->
<script type="text/javascript">
var _paq = _paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="{{ settings.PIWIK_URL }}";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', '{{ settings.PIWIK_SITEID }}']);
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>
<noscript><p><img src="{{ settings.PIWIK_URL }}piwik.php?idsite={{ settings.PIWIK_SITEID }}&rec=1" style="border:0;" alt="" /></p></noscript>
<!-- End Piwik Code -->
{% endif %}
</head>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment