Skip to content

Latest commit

 

History

History
29 lines (20 loc) · 445 Bytes

README.md

File metadata and controls

29 lines (20 loc) · 445 Bytes

go-referrer-parser

Convert HTTP Referer URLs into grouped attributions.

Installation

go get github.com/medama-io/go-referrer-parser

Usage

package main

import (
	"fmt"
	"github.com/medama-io/go-referrer-parser"
)

func main() {
	// Create a new parser on start up.
	parser := referrer.NewParser()

	// Parse a referrer URL.
	name, err := parser.Parse("https://www.google.co.uk")
	
	fmt.Println(name) // "Google"
}