Skip to content

Commit e8e1a18

Browse files
committed
Polished .NET details
1 parent e9b8269 commit e8e1a18

File tree

2 files changed

+47
-15
lines changed

2 files changed

+47
-15
lines changed

README.md

Lines changed: 42 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,18 @@ Java/Scala: [![Build Status](https://travis-ci.org/snowplow/referer-parser.png)]
44

55
referer-parser is a multi-language library for extracting marketing attribution data (such as search terms) from referer URLs, inspired by the [ua-parser] [ua-parser] project (an equivalent library for user agent parsing).
66

7-
referer-parser is available in the following languages, each in a sub-folder of this repository:
8-
9-
* [Ruby implementation] [ruby-impl]
10-
* [Java and Scala implementation] [java-scala-impl]
11-
* [Python implementation] [python-impl]
12-
137
referer-parser is a core component of [Snowplow] [snowplow], the open-source web-scale analytics platform powered by Hadoop, Hive and Redshift.
148

159
_Note that we always use the original HTTP misspelling of 'referer' (and thus 'referal') in this project - never 'referrer'._
1610

11+
## Maintainers
12+
13+
* Ruby: [Snowplow Analytics] [snowplow-analytics]
14+
* Java/Scala: [Snowplow Analytics] [snowplow-analytics]
15+
* Python: [Don Spaulding] [donspaulding]
16+
* .NET: [Sepp Wijnands] [swijnands]
17+
* `referers.yml`: [Snowplow Analytics] [snowplow-analytics]
18+
1719
## Usage: Java
1820

1921
The Java version of this library uses the updated API, and identifies search, social, webmail, internal and unknown referers:
@@ -98,6 +100,27 @@ print(r.uri) # ParseResult(scheme='http', netloc='www.google.com'
98100

99101
For more information, please see the Python [README] [python-readme].
100102

103+
## Usage: .NET
104+
105+
The .NET (C#) version of this library uses the updated API, and identifies search, social, webmail, internal and unknown referers:
106+
107+
```C#
108+
using RefererParser;
109+
110+
...
111+
112+
string refererUrl = "http://www.google.com/search?q=gateway+oracle+cards+denise+linn&hl=en&client=safari";
113+
string pageUrl = "http:/www.psychicbazaar.com/shop" // Our current URL
114+
115+
var referer = Parser.Parse(new Uri(refererUrl), pageUrl);
116+
117+
Console.WriteLine(r.Medium); // => "Search"
118+
Console.WriteLine(r.Source); // => "Google"
119+
Console.WriteLine(r.Term); // => "gateway oracle cards denise linn"
120+
```
121+
122+
For more information, please see the .NET [README] [dotnet-readme].
123+
101124
## referers.yml
102125

103126
referer-parser identifies whether a URL is a known referer or not by checking it against the [`referers.yml`] [referers-yml] file; the intention is that this YAML file is reusable as-is by every language-specific implementation of referer-parser.
@@ -148,22 +171,27 @@ The Java/Scala port is copyright 2012-2013 Snowplow Analytics Ltd and is availab
148171

149172
The Python port is copyright 2012-2013 [Don Spaulding] [donspaulding] and is available under the [Apache License, Version 2.0] [apache-license].
150173

174+
The .NET port is copyright 2013 [iPerform Software] [iperform] and is available under the [Apache License, Version 2.0] [apache-license].
175+
151176
[ua-parser]: https://github.com/tobie/ua-parser
152177

153178
[snowplow]: https://github.com/snowplow/snowplow
154-
[ruby-impl]: https://github.com/snowplow/referer-parser/tree/master/ruby
179+
[snowplow-analytics]: http://snowplowanalytics.com
180+
[donspaulding]: https://github.com/donspaulding
181+
[swijnands]: https://github.com/swijnands
182+
[iperform]: http://www.iperform.nl/
183+
184+
[piwik]: http://piwik.org
185+
[piwik-search-engines]: https://github.com/piwik/piwik/blob/master/core/DataFiles/SearchEngines.php
186+
[piwik-socials]: https://github.com/piwik/piwik/blob/master/core/DataFiles/Socials.php
187+
155188
[ruby-readme]: https://github.com/snowplow/referer-parser/blob/master/ruby/README.md
156-
[java-scala-impl]: https://github.com/snowplow/referer-parser/tree/master/java-scala
157189
[java-scala-readme]: https://github.com/snowplow/referer-parser/blob/master/java-scala/README.md
158-
[python-impl]: https://github.com/snowplow/referer-parser/tree/master/python
159190
[python-readme]: https://github.com/snowplow/referer-parser/blob/master/python/README.md
191+
[dotnet-readme]: https://github.com/snowplow/referer-parser/blob/master/dotnet/README.md
160192
[referers-yml]: https://github.com/snowplow/referer-parser/blob/master/referers.yml
161-
[talk-to-us]: https://github.com/snowplow/snowplow/wiki/Talk-to-us
162193

163-
[piwik]: http://piwik.org
164-
[piwik-search-engines]: https://github.com/piwik/piwik/blob/master/core/DataFiles/SearchEngines.php
165-
[piwik-socials]: https://github.com/piwik/piwik/blob/master/core/DataFiles/Socials.php
166-
[donspaulding]: https://github.com/donspaulding
194+
[talk-to-us]: https://github.com/snowplow/snowplow/wiki/Talk-to-us
167195

168196
[apache-license]: http://www.apache.org/licenses/LICENSE-2.0
169197
[gpl-license]: http://www.gnu.org/licenses/gpl-3.0.html

dotnet/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ This is the .NET implementation of [referer-parser] [referer-parser], the librar
44

55
The implementation uses the shared 'database' of known referers found in [`referers.yml`] [referers-yml].
66

7+
The Python version of referer-parser is maintained by [Sepp Wijnands] [swijnands].
8+
79
## C\#
810

911
### Usage
@@ -39,7 +41,7 @@ A NuGet Package is available, under package id RefererParser.
3941

4042
## Copyright and license
4143

42-
The referer-parser .NET library is copyright 2013 iPerform Software.
44+
The referer-parser .NET library is copyright 2013 [iPerform Software] [iperform].
4345

4446
Licensed under the [Apache License, Version 2.0] [license] (the "License");
4547
you may not use this software except in compliance with the License.
@@ -56,3 +58,5 @@ limitations under the License.
5658
[referers-yml]: https://github.com/snowplow/referer-parser/blob/master/referers.yml
5759

5860
[license]: http://www.apache.org/licenses/LICENSE-2.0
61+
[iperform]: http://www.iperform.nl/
62+
[swijnands]: https://github.com/swijnands

0 commit comments

Comments
 (0)