mirror of
https://git.teknik.io/Teknikode/Teknik.git
synced 2023-08-02 14:16:22 +02:00
Added prefix for dev systems to tracking
This commit is contained in:
parent
090cf9f5b7
commit
6f43037f72
@ -54,23 +54,29 @@
|
||||
|
||||
@if (Model.Config.PiwikConfig.Enabled)
|
||||
{
|
||||
<!-- Piwik -->
|
||||
<script type="text/javascript">
|
||||
var _paq = _paq || [];
|
||||
_paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
|
||||
_paq.push(["setCookieDomain", "*.teknik.io"]);
|
||||
_paq.push(["setDomains", ["*.teknik.io"]]);
|
||||
_paq.push(['trackPageView']);
|
||||
_paq.push(['enableLinkTracking']);
|
||||
(function() {
|
||||
var u="//stats.teknik.io/";
|
||||
_paq.push(['setTrackerUrl', u+'piwik.php']);
|
||||
_paq.push(['setSiteId', 1]);
|
||||
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>
|
||||
<!-- End Piwik Code -->
|
||||
string sub = Request.RequestContext.RouteData.Values["sub"].ToString();
|
||||
if (Model.Config.DevEnvironment)
|
||||
{
|
||||
sub = "dev - " + sub;
|
||||
}
|
||||
|
||||
<!-- Piwik -->
|
||||
<script type="text/javascript">
|
||||
var _paq = _paq || [];
|
||||
_paq.push(["setDocumentTitle", "@sub/" + document.title]);
|
||||
_paq.push(["setCookieDomain", "*.teknik.io"]);
|
||||
_paq.push(["setDomains", ["*.teknik.io"]]);
|
||||
_paq.push(['trackPageView']);
|
||||
_paq.push(['enableLinkTracking']);
|
||||
(function() {
|
||||
var u="//stats.teknik.io/";
|
||||
_paq.push(['setTrackerUrl', u+'piwik.php']);
|
||||
_paq.push(['setSiteId', 1]);
|
||||
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>
|
||||
<!-- End Piwik Code -->
|
||||
}
|
||||
|
||||
<script type="text/javascript">
|
||||
|
Loading…
Reference in New Issue
Block a user