mirror of
https://git.teknik.io/Teknikode/Teknik.git
synced 2023-08-02 14:16:22 +02:00
Reverted Piwik Tracker package to last working copy.
This commit is contained in:
parent
18a066502c
commit
73403551d6
@ -1,5 +1,4 @@
|
||||
using nClam;
|
||||
using Piwik.Tracker;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.Entity;
|
||||
|
@ -118,9 +118,6 @@
|
||||
<HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Piwik.Tracker, Version=3.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Piwik.Tracker.3.0.0\lib\net40\Piwik.Tracker.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PresentationFramework" />
|
||||
<Reference Include="QRCoder, Version=1.2.3.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\QRCoder.1.2.3\lib\net40\QRCoder.dll</HintPath>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
For more information on how to configure your ASP.NET application, please visit
|
||||
http://go.microsoft.com/fwlink/?LinkId=301880
|
||||
|
@ -38,7 +38,6 @@
|
||||
<package id="nClam" version="2.0.6.0" targetFramework="net462" />
|
||||
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net462" userInstalled="true" />
|
||||
<package id="Owin" version="1.0" targetFramework="net462" />
|
||||
<package id="Piwik.Tracker" version="3.0.0" targetFramework="net462" />
|
||||
<package id="QRCoder" version="1.2.3" targetFramework="net462" />
|
||||
<package id="Respond" version="1.4.2" targetFramework="net452" userInstalled="true" />
|
||||
<package id="System.Xml.XmlSerializer" version="4.3.0" targetFramework="net462" />
|
||||
|
@ -40,8 +40,8 @@
|
||||
<HintPath>..\..\packages\Piwik.Analytics.0.3.0\lib\net40\Piwik.Analytics.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Piwik.Tracker, Version=3.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Piwik.Tracker.3.0.0\lib\net40\Piwik.Tracker.dll</HintPath>
|
||||
<Reference Include="Piwik.Tracker, Version=2.16.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Piwik.Tracker.2.16.0.0\lib\net40\Piwik.Tracker.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
|
@ -21,31 +21,31 @@ namespace Teknik.Piwik
|
||||
sub = "dev - " + sub;
|
||||
}
|
||||
|
||||
//PiwikTracker.URL = config.PiwikConfig.Url;
|
||||
PiwikTracker.URL = config.PiwikConfig.Url;
|
||||
PiwikTracker tracker = new PiwikTracker(config.PiwikConfig.SiteId, config.PiwikConfig.Url);
|
||||
|
||||
// Set Request Info
|
||||
tracker.SetIp(clientIp);
|
||||
tracker.SetTokenAuth(config.PiwikConfig.TokenAuth);
|
||||
tracker.setIp(clientIp);
|
||||
tracker.setTokenAuth(config.PiwikConfig.TokenAuth);
|
||||
|
||||
tracker.SetUserAgent(userAgent);
|
||||
tracker.setUserAgent(userAgent);
|
||||
|
||||
// Set browser info
|
||||
tracker.SetResolution(pixelWidth, pixelHeight);
|
||||
tracker.SetBrowserHasCookies(hasCookies);
|
||||
tracker.setResolution(pixelWidth, pixelHeight);
|
||||
tracker.setBrowserHasCookies(hasCookies);
|
||||
if (!string.IsNullOrEmpty(acceptLang))
|
||||
tracker.SetBrowserLanguage(acceptLang);
|
||||
tracker.SetPlugins(new BrowserPlugins {Java = hasJava});
|
||||
tracker.setBrowserLanguage(acceptLang);
|
||||
tracker.setPlugins(new BrowserPlugins {java = hasJava});
|
||||
|
||||
// Get Referral
|
||||
if (!string.IsNullOrEmpty(urlReferrer))
|
||||
tracker.SetUrlReferrer(urlReferrer);
|
||||
tracker.setUrlReferrer(urlReferrer);
|
||||
|
||||
if (!string.IsNullOrEmpty(url))
|
||||
tracker.SetUrl(url);
|
||||
tracker.setUrl(url);
|
||||
|
||||
// Send the tracking request
|
||||
tracker.DoTrackPageView(string.Format("{0}/{1}", sub, title));
|
||||
tracker.doTrackPageView(string.Format("{0}/{1}", sub, title));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
@ -56,15 +56,15 @@ namespace Teknik.Piwik
|
||||
|
||||
public static void TrackDownload(string userAgent, string clientIp, string url, string urlReferrer)
|
||||
{
|
||||
TrackAction(ActionType.Download, userAgent, clientIp, url, urlReferrer);
|
||||
TrackAction(PiwikTracker.ActionType.download, userAgent, clientIp, url, urlReferrer);
|
||||
}
|
||||
|
||||
public static void TrackLink(string userAgent, string clientIp, string url, string urlReferrer)
|
||||
{
|
||||
TrackAction(ActionType.Link, userAgent, clientIp, url, urlReferrer);
|
||||
TrackAction(PiwikTracker.ActionType.link, userAgent, clientIp, url, urlReferrer);
|
||||
}
|
||||
|
||||
private static void TrackAction(ActionType type, string userAgent, string clientIp, string url, string urlReferrer)
|
||||
private static void TrackAction(PiwikTracker.ActionType type, string userAgent, string clientIp, string url, string urlReferrer)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -74,19 +74,19 @@ namespace Teknik.Piwik
|
||||
{
|
||||
PiwikTracker tracker = new PiwikTracker(config.PiwikConfig.SiteId, config.PiwikConfig.Url);
|
||||
|
||||
tracker.SetUserAgent(userAgent);
|
||||
tracker.setUserAgent(userAgent);
|
||||
|
||||
tracker.SetIp(clientIp);
|
||||
tracker.SetTokenAuth(config.PiwikConfig.TokenAuth);
|
||||
tracker.setIp(clientIp);
|
||||
tracker.setTokenAuth(config.PiwikConfig.TokenAuth);
|
||||
|
||||
// Get Referral
|
||||
if (!string.IsNullOrEmpty(urlReferrer))
|
||||
tracker.SetUrlReferrer(urlReferrer);
|
||||
tracker.setUrlReferrer(urlReferrer);
|
||||
|
||||
if (!string.IsNullOrEmpty(url))
|
||||
tracker.SetUrl(url);
|
||||
tracker.setUrl(url);
|
||||
|
||||
tracker.DoTrackAction(url, type);
|
||||
tracker.doTrackAction(url, type);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
@ -6,5 +6,5 @@
|
||||
<package id="Microsoft.AspNet.WebPages" version="3.2.3" targetFramework="net462" />
|
||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net462" />
|
||||
<package id="Piwik.Analytics" version="0.3.0" targetFramework="net462" />
|
||||
<package id="Piwik.Tracker" version="3.0.0" targetFramework="net462" />
|
||||
<package id="Piwik.Tracker" version="2.16.0.0" targetFramework="net462" />
|
||||
</packages>
|
Loading…
Reference in New Issue
Block a user