-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Intelligently parse referrers so they're easier to glance at #8
Comments
Can't you use the existing extracted referer fields from the RefererParserEnrichmentt? |
Hi @alexanderdean - thanks! Bing
|
scala> val refererUrl = "http://www.bing.com/search?q=search+query&a=results&MID=2500"
refererUrl: java.lang.String = http://www.bing.com/search?q=search+query&a=results&MID=2500
scala> val pageUrl = "http://random"
pageUrl: java.lang.String = http://random
scala> import com.snowplowanalytics.refererparser.scala.Parser
import com.snowplowanalytics.refererparser.scala.Parser
scala> for (r <- Parser.parse(refererUrl, pageUrl)) {
| println(r.medium)
| for (s <- r.source) {
| println(s)
| }
| for (t <- r.term) {
| println(t)
| }
| }
search
Bing
search query Therefore I think your RefererParserEnrichment inside your Kinesis Enrich isn't correctly configured. |
I see - thanks! Great info. |
@alexanderdean - the latest snowplow's referrer enrichments are also working great. prettyReferrer:: EnrichedEvent -> Maybe String
prettyReferrer e =
case (pageReferrer e, refrMedium e, refrSource e, refrTerm e) of
("", _, _, _) -> Nothing
(url, "search", "", term) -> Just $ url ++ " [TODO: prettyReferrer: \
\empty refrSource?]"
(url, "search", source, "") -> Just $ source ++ " [Secure Search]"
(url, "search", source, term) -> Just $ concat [source, " Search - ", term]
(url, med, source, term) -> Just $ "TODO: prettyReferrer: " ++
intercalate " - " [url, med, source, term] |
Ah, great to hear it! |
Example:
http://www.google.com/url?cmVhbGx5IGxvbmcgc3RyaW5nIHRvIGluZGljYXRlIGEgc2VjdXJlIHNlYXJjaA== to
Google (secure search)`The text was updated successfully, but these errors were encountered: