by mmohebbi on 2/27/15, 4:03 PM with 2 comments
1. Based on the real time data from Google Analytics. E.g. no one day time lag. No data from crawling the web.
2. Use Google Analytics Real Time API or something else approved by Google so it isn't going to get Google blocking my analytics account.
3. Only posts referrers that have never been seen before, or never been seen for some trailing X day window.
by omgmog on 2/27/15, 4:22 PM
- Set up a cron job to check the real-time API for changes to your referrers
- when a new referrer is detected, talk to Slack via their WebHooks integration service
You could use Google's App Engine (and Scheduled Tasks with Cron for Python) for the cron job, https://cloud.google.com/appengine/docs/python/config/cron
Read more about the WebHooks integration service here: https://slack.com/services/new/incoming-webhook