Is there a posibillity to import own data into google analytics?

前端 未结 7 2344
[愿得一人]
[愿得一人] 2021-02-10 09:09

I want to compare own data with data generated by google analytics. For example I want to see the number of my twitter followers compared with my page visitors per day.

7条回答
  •  生来不讨喜
    2021-02-10 09:45

    You could write a script which runs daily on a server and connects to Twitter to measure the number of followers and then uploads the number of followers to Google Analytics. You could also report an event to Google Analytics when you get a new follower or when a follower unfollows you.

    There are several options to upload data into Google Analytics:

    1. Use a library which implements the ga.js script server-side

    When you use Google Analytics in the way described by Google, you include a script on your website. This script sends data from the visitors browser to the Google Analytics server.

    This script has been reverse engineered and implemented in server-side libraries. Now you can send the same data from the server to the Google Analytics server. You can use PHP-GA for PHP or pyga for Python.

    2. Use the Google Analytics measurement protocol

    The Google Analytics measurement protocol is a new API to send data to Google Analytics. You can send data by sending POST requests to the API.

提交回复
热议问题