I'm starting to build a tool that I imagine already exists. I want to have all new referrers from the real time section of Google Analytics be posted to a Slack channel. Hard requirements are:<p>1. Based on the real time data from Google Analytics. E.g. no one day time lag. No data from crawling the web.<p>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.<p>3. Only posts referrers that have never been seen before, or never been seen for some trailing X day window.
The way I'd approach this would be something like this:<p>- Set up a cron job to check the real-time API for changes to your referrers<p>- when a new referrer is detected, talk to Slack via their WebHooks integration service<p>You could use Google's App Engine (and Scheduled Tasks with Cron for Python) for the cron job, <a href="https://cloud.google.com/appengine/docs/python/config/cron" rel="nofollow">https://cloud.google.com/appengine/docs/python/config/cron</a><p>Read more about the WebHooks integration service here: <a href="https://slack.com/services/new/incoming-webhook" rel="nofollow">https://slack.com/services/new/incoming-webhook</a>