Browse Source

Reverted Piwik Tracker package to last working copy.

tags/3.0.0
Teknikode 3 years ago
parent
commit
73403551d6

+ 0
- 1
Teknik/Areas/Upload/Controllers/UploadController.cs View File

@@ -1,5 +1,4 @@
using nClam;
using Piwik.Tracker;
using System;
using System.Collections.Generic;
using System.Data.Entity;

+ 0
- 3
Teknik/Teknik.csproj View File

@@ -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>

+ 6
- 6
Teknik/Web.config View File

@@ -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
@@ -57,8 +57,8 @@
<add name="PerfModule" type="Teknik.Modules.PerformanceMonitorModule, Teknik" />
<add name="UserAuthModule" type="Teknik.Modules.UserAuthModule, Teknik" />
<add name="BlacklistModule" type="Teknik.Modules.BlacklistModule, Teknik" />
<add name="CORSModule" type="Teknik.Modules.CORSModule, Teknik"/>
<add name="CSPModule" type="Teknik.Modules.CSPModule, Teknik"/>
<add name="CORSModule" type="Teknik.Modules.CORSModule, Teknik" />
<add name="CSPModule" type="Teknik.Modules.CSPModule, Teknik" />
<remove name="UrlRoutingModule-4.0" />
<add name="UrlRoutingModule-4.0" type="System.Web.Routing.UrlRoutingModule" preCondition="" />
</modules>
@@ -137,9 +137,9 @@
<add name="Access-Control-Allow-Headers" value="Authorization, Accept, Origin, Content-Type, X-Requested-With, Connection, Transfer-Encoding" />
<add name="strict-transport-security" value="max-age=31536000; includeSubdomains; preload" />
<add name="X-XSS-Protection" value="1; mode=block" />
<add name="X-Content-Type-Options" value="nosniff"/>
<add name="Referrer-Policy" value="no-referrer, strict-origin-when-cross-origin"/>
<add name="Public-Key-Pins" value="max-age=300; includeSubDomains; pin-sha256=&quot;grX4Ta9HpZx6tSHkmCrvpApTQGo67CYDnvprLg5yRME=&quot;; pin-sha256=&quot;C5+lpZ7tcVwmwQIMcRtPbsQtWLABXhQzejna0wHFr8M=&quot;;"/>
<add name="X-Content-Type-Options" value="nosniff" />
<add name="Referrer-Policy" value="no-referrer, strict-origin-when-cross-origin" />
<add name="Public-Key-Pins" value="max-age=300; includeSubDomains; pin-sha256=&quot;grX4Ta9HpZx6tSHkmCrvpApTQGo67CYDnvprLg5yRME=&quot;; pin-sha256=&quot;C5+lpZ7tcVwmwQIMcRtPbsQtWLABXhQzejna0wHFr8M=&quot;;" />
<add name="Vary" value="Origin" />
</customHeaders>
</httpProtocol>

+ 0
- 1
Teknik/packages.config View File

@@ -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" />

+ 2
- 2
Utilities/Piwik/Piwik.csproj View File

@@ -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" />

+ 20
- 20
Utilities/Piwik/Tracking.cs View File

@@ -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)

+ 1
- 1
Utilities/Piwik/packages.config View File

@@ -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…
Cancel
Save