[Gem] Referrer tracks sources of your site’s visitors and link them to leads

Referrer (GitHub - salkar/referrer: Tracking system for sources of site's visitors with sources priorities and linking most priority source with tracked orders/requests/etc) tracks sources with which
users visit your site, converts them into utm markup, computes priority
of these sources and provides linking for sources with tracked model’s
records (orders/requests/etc).

Sample questions which Referrer can help to answer:

  • Where did this user come from?

  • {utm_source: ‘google’, utm_medium: ‘organic’, utm_campaign: ‘(none)’,
    utm_content: ‘(none)’, utm_term: ‘user search query’, kind: ‘organic’}

  • Where did users come from last month?

  • [{utm_source: ‘google’, utm_medium: ‘organic’, utm_campaign: ‘(none)’,
    utm_content: ‘(none)’, utm_term: ‘user search query’, kind: ‘organic’,
    count: 1}, {utm_source: ‘google’, utm_campaign: ‘adv_campaign’,
    utm_medium: ‘cpc’, utm_content: ‘adv 1’, utm_term: ‘some text’, kind:
    ‘utm’, count: 2}, etc…]

  • Where did user who make purchase come from?

  • {utm_source: ‘twitter.com’, utm_medium: ‘referral’, utm_campaign:
    ‘(none)’, utm_content: ‘/some_path’, utm_term: ‘(none)’, kind:
    ‘referral’}

  • Where did users who left some requests come from last week?

  • [{utm_source: ‘(direct)’, utm_medium: ‘(none)’, utm_campaign:
    ‘(none)’, utm_content: ‘(none)’, utm_term: ‘(none)’, kind: ‘direct’,
    count: 3}, {utm_source: ‘google’, utm_campaign: ‘adv_campaign’,
    utm_medium: ‘cpc’, utm_content: ‘adv 2’, utm_term: ‘another text’, kind:
    ‘utm’, count: 5}, etc…]