How to get statistics of (internal) referrers for landing pages? I'm building a Drupal 7 site. Here's a use case that I'm not sure how to deal with:


for a campaign, we have a specific landing page.
we promote the landing page through different means (newsletter, flyers, website).
we want to track the effectiveness of each promotion.


As a sample, I have mydomain.com/mylandingpage?promoId=[n] and I want to track how many people accessed that page through promoid=1 vs promoid=2.

I do not necessarily have a form on the landing page, i.e. knowing how many users submitted a form after seeing a promotion is a different use case (and one that can be solved with a hidden form field).

How can I get statistics for what I need? The only thing I can think of is making special redirect URLs for each promo, e.g. mydomain.com/mylandingpage/promo1, but that would become messy/cumbersome very soon.

I'm aware of Google Analytics, but I'm looking for an internal solution.

Any ideas?
To answer this question, there are basically 2 approaches possible, as further detailed below (you might want to combine them also ...).

Option 1: Use the Rules module

You can use the Rules module to trigger "some" Rules Actions, based on the actual value specified as your promoid. Use either of these modules to trigger Rules Events based on the 'current URL being viewed' (quotes are from their project pages):


Rules URL Argument:


  ... provides two rules conditions based on URL arguments:
  
  
  check if a URL argument is present
  compare the value of an URL argument
  
  
  It also provides an action that makes the value of an URL argument available as new variable to Rules.

Path Rules:


  ... implements Rules conditions for checking the URL against a given string for triggering actions.



What the actual Rules Actions should be, is up to your own imagination, but here are just a few possibilities (rather basic, but straight forward to implement using the Rules module):


Perform a redirect to some URL, specific to each promoid (and then you just count the hits for each of these URLs).
Send an eMail each time you have a hit, whereas the content of the eMail somehow reflects the value of your promoid, and/or you use a different eMail ID to send such eMail to, based on that value.
...


Option 2: Use a typical module about statistics

Below is a list of modules to pick from (quotes are from their project pages).


Statistics Advanced:


  Provides a few advanced options to the core Statistics module.

Visitors:


  Displays information about visitors, and integrates with the WhoIs Lookup module

Better Statistics:


  introduces a Statistics API, which allows for a way to collect, limit, and route custom access statistics and data.

Piwik Web Analytics:


  Adds the Piwik web statistics tracking system (free open source) to your website.
  
  Related module: Piwik Reports, which provides graphical reporting of your site's tracking data inside Drupal.

Chartbeat:


  ... to provide third party integration with Chartbeat, for real-time site monitoring statistics.

Stat Counter:


  ... provides an integration between Drupal and StatCounter web statistics.