Skip to content

thiesen/traffic_source_parser

Repository files navigation

TrafficSourceParser

Code Climate Test Coverage Build Status

A parser to TrafficSourceCookie

WIP 🙏

Usage

parsed_source = TrafficSourceParser.parse(cookie_value)

It sets parsed_source as a specific TrafficSourceParser::Parser object, with attributes defined by its type and cookie params.

Cookie value is utmz:

#<TrafficSourceParser::Parser::UtmzParser::Utmz utmcsr="t.co", utmccn="(referral)", utmcmd="referral", utmcct="/EFzCFawFrk">

Cookie value is campaign:

#<TrafficSourceParser::Parser::CampaignParser::Campaign utm_campaign="spring", utm_medium="email", utm_source="newsletter1", utm_content="toplink">

Cookie value is a referrer:

Referrer is a listed social network:

#<TrafficSourceParser::Result::Social source="Facebook">

Referrer is from a listed search engine:

#<TrafficSourceParser::Result::Search source="Bing", query="shipit resultados digitais">

Referrer is unknown

#<TrafficSourceParser::Result::Generic source="http://www.resultadosdigitais.com.br">

About

Traffic Source Parser for UTM-Alternative

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published