Upload external data up to 1GB to Google Analytics via the management API.
ga_custom_upload_file(accountId, webPropertyId, customDataSourceId, upload)
Account Id
Web Property Id
Custom data source Id
An R data.frame or a file path location (character)
An object of class ga_custom_data_source_upload
You need to create a custom data source in the web UI first.
If you are uploading an R data frame, the function will prefix the column names with "ga:"
for you if necessary.
After upload check the status by querying data sources using ga_custom_upload
and examining the status
field.
Currently only supports simple uploads (not resumable).
A guide for preparing the data is available: from Google here.
The dev guide for this function: Data Import Developer Guide
Other custom datasource functions:
ga_custom_datasource()
,
ga_custom_upload_delete()
,
ga_custom_upload_list()
,
ga_custom_upload()