简体   繁体   中英

Trying to send data to Google Analytics with Measurement Protocol

So, I'm trying to send data to GA using their Measurement Protocol with Python. From what I can gather, I will be sending POST requests via HTTP, but I'm not sure where to start. The data will likely be coming from an API or Database.

My project is inspired by this video if it gives you a better idea: http://www.elisa-dbi.co.uk/blog/tracking-wemo-switch-motion-google-universal-analytics/

I guess I'm creating a wrapper, but I'm unclear to what exactly that is. Any advice or input would be greatly appreciated.

Thanks!

您可以通过以下文档将HTTP POST请求发送到Google Analytics(分析) https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters

By now you have probably already created your wrapper, but for what its worth, my firm has recently released a library under BSD license, with an API similar to that of Google's analytics.js .

https://github.com/analytics-pros/universal-analytics-python

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM