1. Home
  2. Docs
  3. Enriching your data
  4. Available enrichments
  5. Referer parser enrichment

Referer parser enrichment

This enrichment uses snowplow referer-parser library to extract attribution data from referer URLs.

Knowing which sites refer users to our website is very much a staple of analytics in order to help understand traffic patterns. This enrichment takes the value of the referring URL and matches it against the company/site it belongs to.

This is particularly useful when looking for specific traffic from search engine providers or social networks for instance. Rather than scouring a full referrer URL list this enrichment adds an additional field so that it’s possible to look at reports that combine sub-domains from some of the bigger referrers.

Configuration

Snowplow has several subdomains like console.snowplowanalytics.com and discourse.snowplowanalytics.com. As users move from these subdomains to our main snowplowanalytics.com domain, we would like to capture that traffic as being referred internally. Therefore we would set the configuration as such:

"internalDomains": [ "console.snowplowanalytics.com", "discourse.snowplowanalytics.com" ],
Code language: JavaScript (javascript)

Enabling this enrichment with the above configuration would fill the refr_medium column in our data warehouse with “Internal” (rather then “Unknown”) when the referring URL to a page matches the subdomains above.

Output

This enrichment populates the following fields of the atomic event :

FieldPurpose
refr_mediumType of referer. Examples : Search, Internal, Unknown, Social, Email
refr_sourceName of referer if recognised. Examples: Google, Facebook
refr_termKeywords if source is a search engine

With this information in the data warehouse it’s possible to get such insights:

refr_mediumnumber of sessions
Search272,699
Internal142,555
Unknown127,335
Social14,525
Email5,345

If you’d like to learn more about Snowplow Insights you can book a demo with our team, or if you’d prefer, you can try Snowplow technology for yourself quickly and easily.