Do you need an external GUI for displaying bttn presses? Do you wish to show bttn presses on a map?




My.bt.tn has great graphs under the statistics page, but if you wish to get more reports or to show data on a 3rd party website, you can utilize the power of the free Google Analytics!


It's simple. You just need these:


1) An account for Google Analytics

2) A tracking ID for Google Analytics


Configure your bttns or bttn group to do the following action to utilize GA's "Measurement Protocol":


1) Action type = HTTP

2) Method = POST

3) URL = https://www.google-analytics.com/collect

4) Arguments in url-encoded format:

Required:

v=1

tid=[your tracking id, e.g. UA-12345678-1]

cid=[arbitrary user ID for the "visit". You can use a static number or bttn tag <ID> to distinct which bttn it was]

t=pageview


Optional arguments*:

dp=/page [tells GA what the "visited" page URL is]

geoid=[tells GA where the visit comes from. You can also utilize bttn tag <LOCATION>**]


5) Save your HTTP action!


Then sign in at google-analytics.com and open the real-time analytics. Press your bttn to see a real-time "visitor". 


All done! 


* You can even add geographic location or campaign id and many other properties to your bttn presses.
See the whole API reference: https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters


** See how to code the location https://developers.google.com/analytics/devguides/collection/protocol/v1/geoid