Manually adding e-commerce transactions in Google Analytics

♀尐吖头ヾ 提交于 2019-12-21 20:57:32

问题


we've had some problems with the tracking of the transactions in Google Analytics in our e-commerce website, and now we've lost a couple of months of data due to a configuration error.

Is it possible to bulk import in some way these transactions, along with their additional parameters (date of event, transaction code, money amount)?

We know when every one of these events has taken place, but we would like to import it back into Analytics to have the complete statistics.

Thank you for the help


回答1:


If the data is in MySQL say for example.

  1. Run a MySQL command which pulls all the orders from the date_you_want_start_from and then limit it till the date_you_want_to_end_from
  2. With this data, then create a MySQL view call it "import_table"
  3. Create a PHP and XML script which loads all the data from import_table, it then writes and fills the XML feed
  4. Just run that XML feed now inside your analytic loop JavaScript and it will loop and basically add data into the past for you.

Note: PHP, XML and MySQL is just a scenario to give you a head on to do it.



来源:https://stackoverflow.com/questions/13009192/manually-adding-e-commerce-transactions-in-google-analytics

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!