

Ask HN: Tool to post new referrers from Google Analytics to Slack? - mmohebbi

I&#x27;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&#x27;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.
======
omgmog
The way I'd approach this would be something like this:

\- 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](https://cloud.google.com/appengine/docs/python/config/cron)

Read more about the WebHooks integration service here:
[https://slack.com/services/new/incoming-
webhook](https://slack.com/services/new/incoming-webhook)

~~~
mmohebbi
Thanks for the response. totally agree that it's quite possible and with
AppEngine it would be pretty easy. The reason I was asking here was to see if
someone had already built it.

