Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -182,4 +182,10 @@ Desktop.ini
$RECYCLE.BIN/

# Roslyn VS2015 junk
*.sln.ide/
*.sln.ide/
*.nupkg

# Visual Studio temp and user data
*/.vs/
/Source/.idea
.idea/
104 changes: 104 additions & 0 deletions CSharpAnalytics.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29009.5
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CSharpAnalytics", "src\CSharpAnalytics\CSharpAnalytics.csproj", "{0334B071-1FB1-4372-B500-4BC58A11EE59}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpAnalytics.Tests", "src\CSharpAnalytics.Tests\CSharpAnalytics.Tests.csproj", "{0BCC678D-7C68-4A6F-AE96-E1EEE2C217DA}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{DA1F96FF-05EC-45C8-BFF6-06089C739CA0}"
ProjectSection(SolutionItems) = preProject
src\LICENCE.txt = src\LICENCE.txt
README.md = README.md
Directory.Build.props = Directory.Build.props
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpAnalytics.Sample.WinForms", "src\Samples\CSharpAnalytics.Sample.WinForms\CSharpAnalytics.Sample.WinForms.csproj", "{07DDA3AD-EE3B-4FE5-B532-059629C6A24E}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{3F625E98-D620-4CF3-BD83-5C97B7360496}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpAnalytics.Sample.Wpf", "src\Samples\CSharpAnalytics.Sample.Wpf\CSharpAnalytics.Sample.Wpf.csproj", "{A599EEEA-FC89-47FB-B8A9-DFD16FC3201D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|ARM = Debug|ARM
Debug|Mixed Platforms = Debug|Mixed Platforms
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|ARM = Release|ARM
Release|Mixed Platforms = Release|Mixed Platforms
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{0334B071-1FB1-4372-B500-4BC58A11EE59}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0334B071-1FB1-4372-B500-4BC58A11EE59}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0334B071-1FB1-4372-B500-4BC58A11EE59}.Debug|ARM.ActiveCfg = Debug|Any CPU
{0334B071-1FB1-4372-B500-4BC58A11EE59}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{0334B071-1FB1-4372-B500-4BC58A11EE59}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{0334B071-1FB1-4372-B500-4BC58A11EE59}.Debug|x64.ActiveCfg = Debug|Any CPU
{0334B071-1FB1-4372-B500-4BC58A11EE59}.Debug|x86.ActiveCfg = Debug|Any CPU
{0334B071-1FB1-4372-B500-4BC58A11EE59}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0334B071-1FB1-4372-B500-4BC58A11EE59}.Release|Any CPU.Build.0 = Release|Any CPU
{0334B071-1FB1-4372-B500-4BC58A11EE59}.Release|ARM.ActiveCfg = Release|Any CPU
{0334B071-1FB1-4372-B500-4BC58A11EE59}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{0334B071-1FB1-4372-B500-4BC58A11EE59}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{0334B071-1FB1-4372-B500-4BC58A11EE59}.Release|x64.ActiveCfg = Release|Any CPU
{0334B071-1FB1-4372-B500-4BC58A11EE59}.Release|x86.ActiveCfg = Release|Any CPU
{0BCC678D-7C68-4A6F-AE96-E1EEE2C217DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0BCC678D-7C68-4A6F-AE96-E1EEE2C217DA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0BCC678D-7C68-4A6F-AE96-E1EEE2C217DA}.Debug|ARM.ActiveCfg = Debug|Any CPU
{0BCC678D-7C68-4A6F-AE96-E1EEE2C217DA}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{0BCC678D-7C68-4A6F-AE96-E1EEE2C217DA}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{0BCC678D-7C68-4A6F-AE96-E1EEE2C217DA}.Debug|x64.ActiveCfg = Debug|Any CPU
{0BCC678D-7C68-4A6F-AE96-E1EEE2C217DA}.Debug|x86.ActiveCfg = Debug|Any CPU
{0BCC678D-7C68-4A6F-AE96-E1EEE2C217DA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0BCC678D-7C68-4A6F-AE96-E1EEE2C217DA}.Release|Any CPU.Build.0 = Release|Any CPU
{0BCC678D-7C68-4A6F-AE96-E1EEE2C217DA}.Release|ARM.ActiveCfg = Release|Any CPU
{0BCC678D-7C68-4A6F-AE96-E1EEE2C217DA}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{0BCC678D-7C68-4A6F-AE96-E1EEE2C217DA}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{0BCC678D-7C68-4A6F-AE96-E1EEE2C217DA}.Release|x64.ActiveCfg = Release|Any CPU
{0BCC678D-7C68-4A6F-AE96-E1EEE2C217DA}.Release|x86.ActiveCfg = Release|Any CPU
{07DDA3AD-EE3B-4FE5-B532-059629C6A24E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{07DDA3AD-EE3B-4FE5-B532-059629C6A24E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{07DDA3AD-EE3B-4FE5-B532-059629C6A24E}.Debug|ARM.ActiveCfg = Debug|Any CPU
{07DDA3AD-EE3B-4FE5-B532-059629C6A24E}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{07DDA3AD-EE3B-4FE5-B532-059629C6A24E}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{07DDA3AD-EE3B-4FE5-B532-059629C6A24E}.Debug|x64.ActiveCfg = Debug|Any CPU
{07DDA3AD-EE3B-4FE5-B532-059629C6A24E}.Debug|x86.ActiveCfg = Debug|Any CPU
{07DDA3AD-EE3B-4FE5-B532-059629C6A24E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{07DDA3AD-EE3B-4FE5-B532-059629C6A24E}.Release|Any CPU.Build.0 = Release|Any CPU
{07DDA3AD-EE3B-4FE5-B532-059629C6A24E}.Release|ARM.ActiveCfg = Release|Any CPU
{07DDA3AD-EE3B-4FE5-B532-059629C6A24E}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{07DDA3AD-EE3B-4FE5-B532-059629C6A24E}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{07DDA3AD-EE3B-4FE5-B532-059629C6A24E}.Release|x64.ActiveCfg = Release|Any CPU
{07DDA3AD-EE3B-4FE5-B532-059629C6A24E}.Release|x86.ActiveCfg = Release|Any CPU
{A599EEEA-FC89-47FB-B8A9-DFD16FC3201D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A599EEEA-FC89-47FB-B8A9-DFD16FC3201D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A599EEEA-FC89-47FB-B8A9-DFD16FC3201D}.Debug|ARM.ActiveCfg = Debug|Any CPU
{A599EEEA-FC89-47FB-B8A9-DFD16FC3201D}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{A599EEEA-FC89-47FB-B8A9-DFD16FC3201D}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{A599EEEA-FC89-47FB-B8A9-DFD16FC3201D}.Debug|x64.ActiveCfg = Debug|Any CPU
{A599EEEA-FC89-47FB-B8A9-DFD16FC3201D}.Debug|x86.ActiveCfg = Debug|Any CPU
{A599EEEA-FC89-47FB-B8A9-DFD16FC3201D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A599EEEA-FC89-47FB-B8A9-DFD16FC3201D}.Release|Any CPU.Build.0 = Release|Any CPU
{A599EEEA-FC89-47FB-B8A9-DFD16FC3201D}.Release|ARM.ActiveCfg = Release|Any CPU
{A599EEEA-FC89-47FB-B8A9-DFD16FC3201D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{A599EEEA-FC89-47FB-B8A9-DFD16FC3201D}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{A599EEEA-FC89-47FB-B8A9-DFD16FC3201D}.Release|x64.ActiveCfg = Release|Any CPU
{A599EEEA-FC89-47FB-B8A9-DFD16FC3201D}.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{07DDA3AD-EE3B-4FE5-B532-059629C6A24E} = {3F625E98-D620-4CF3-BD83-5C97B7360496}
{A599EEEA-FC89-47FB-B8A9-DFD16FC3201D} = {3F625E98-D620-4CF3-BD83-5C97B7360496}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {8181473F-92C8-4C1D-A143-DE6AB7671CFB}
EndGlobalSection
EndGlobal
File renamed without changes.
19 changes: 19 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<Project>
<PropertyGroup>
<Product>Sonova.CSharpAnalytics</Product>
<authors>Damien Guard</authors>
<Company>Attack Pattern</Company>
<Copyright>Copyright 2012-2015 Attack Pattern LLC</Copyright>
<Description>"Google Analytics client for C# applications.</Description>
<Configuration Condition="$(Configuration) == ''">Debug</Configuration>
<BaseIntermediateOutputPath>$(MSBuildThisFileDirectory)obj/$(MSBuildProjectName)/</BaseIntermediateOutputPath>
<OutputPath>$(MSBuildThisFileDirectory)bin/$(MSBuildProjectName)/$(Configuration)/</OutputPath>
<LangVersion>latest</LangVersion>
<VersionPrefix>1.6.1</VersionPrefix>
<VersionSuffix>dev</VersionSuffix>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<ErrorReport>prompt</ErrorReport>
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
</Project>
26 changes: 0 additions & 26 deletions NuGet/CSharpAnalytics.nuspec

This file was deleted.

59 changes: 16 additions & 43 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,9 @@ Google produce a library for *reading* analytics data in .NET apps but not recor

Our goal is to support all major C# platforms. Right now we have project files for:

* Windows 8 Store applications
* Windows 8.1 Store applications
* Windows Phone 8 "Silverlight" applications
* WinForms .NET 4.5 applications
* WinForms .NET 4.6.1 applications
* WPF .NET Core 3 applications

All of these platforms include the AutoMeasurement class that let you get up and running with only a few lines of code.

Expand Down Expand Up @@ -69,46 +68,6 @@ You can either:
1. Get a more stable release via NuGet
2. Clone the source code and add a reference to CSharpAnalytics.Windows81.csproj (or Windows8, .NET45 depending on your environment)

### Automatic analytics for Windows 8/8.1 Store apps

The easiest way to start is to use the AutoMeasurement helper class. It hooks into a few events and will automatically give you:

* Application launch and reason
* Visitor, session activity, time-spent
* Social sharing events
* Screen navigation activity
* Operating system, screen resolution, CPU type identification
* Save/persist last 60 hits for offline/online support

At the start of the OnLaunched method in App.xaml.cs add (replacing UA-319000-8 with your own Google Analytics property ID and 'e' with 'args' if using a Windows 8.0 template):

```csharp
CSharpAnalytics.AutoMeasurement.Start(new CSharpAnalytics.MeasurementConfiguration("UA-319000-8"), e);
```

If your app is not a single page but uses Frames to navigate you can automatically track page navigation events by adding this line to the end of OnLaunched:

```csharp
CSharpAnalytics.AutoMeasurement.Attach(rootFrame);
```

### Automatic analytics for Windows Phone 8 "Silverlight" apps

The easiest way to start is to use the AutoMeasurement helper class. It hooks into a few events and will automatically give you:

* Application launch and reason
* Visitor, session activity, time-spent
* Screen navigation activity
* Operating system version, screen resolution, CPU type identification
* Save/persist last 60 hits for offline/online support

Add these two lines to your Application_Launching method in App.xaml.cs (replacing UA-319000-8 with your own Google Analytics property ID):

```csharp
CSharpAnalytics.AutoMeasurement.Start(new CSharpAnalytics.MeasurementConfiguration("UA-319000-8"), e);
CSharpAnalytics.AutoMeasurement.Attach(RootFrame);
```

### Going further

See [going further with CSharpAnalytics](https://github.com/AttackPattern/CSharpAnalytics/wiki/Going-further)
Expand Down Expand Up @@ -153,3 +112,17 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

## Packing

### dotnet pack

More info at:

https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-pack

Example:
```
dotnet pack -c release --include-symbols --version-suffix ""
```

119 changes: 0 additions & 119 deletions Source/CSharpAnalytics.Tests/CSharpAnalytics.Test.Net45.csproj

This file was deleted.

Loading