You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
usingRefererParser;
...
string refererUrl="https://www.google.com/search?q=gateway+oracle+cards+denise+linn&hl=en&client=safari";stringpageUrl="http:/www.psychicbazaar.com/shop";// Our current URLvarreferer=Parser.Parse(newUri(refererUrl),pageUrl);Console.WriteLine(r.Medium);// => "Search"Console.WriteLine(r.Source);// => "Google"Console.WriteLine(r.Term);// => "gateway oracle cards denise linn"// usage with custom supplied databases and new Medium Values:privateenumTestEnum{// Order is important, most important medium's firstSearch=0,Paid,Social,Email,Unknown,Internal,Foobar}referrerUrl="https://thrivehive.com";varparser=newParser<MyEnum>(new[]{@"foobar: Thrivehive: domains: - thrivehive.com"});varreferer=Parser.Parse(newUri(refererUrl),pageUrl);Console.WriteLine(r.Medium);// => "Foobar"Console.WriteLine(r.Source);// => "Thrivehive"
Installation
A NuGet Package is available, under package id RefererParser.
Contributing
Fork it
Create your feature branch (git checkout -b my-new-feature)
Commit your changes (git commit -am 'Add some feature')
Push to the branch (git push origin my-new-feature)
Create new Pull Request
Copyright and license
The referer-parser .NET (C#) library is copyright 2013 iPerform Software.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this software except in compliance with the License.
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.