Hi folks! I'm failing at making a simple python sc...
# support
p
Hi folks! I'm failing at making a simple python script to push data to rudder .
Copy code
import rudder_analytics

rudder_analytics.write_key = "my_key"
rudder_analytics.data_plane_url = "https://my.rudder.io/v1/batch"

developer_user_id = 'developer_user_id'
track_type = 'Simple Track Event'
track_data = {'key1': 'val1'}

rudder_analytics.track(developer_user_id, track_type, track_data)
It returns a 404 and no more information. However, with the same write_key / data_plane_url I can send successfully data using the
generate_event
script. I'm not sure how to get more information to debug the real problem (as far as I check, the URL exists). The version of the python package is:
Copy code
(.env) # pip freeze | grep rudder
rudder-sdk-python==1.0.0b1
Any hint would be appreciated, thanks for your time!
n
Can you remove the /v1/batch in the URL and try again
p
it worked! and it was definitely my bad, I checked the
generate_event
wrong.
https://<data_plane_url>/v1/batch
n
No problem 👍
🙌 1
p
Following, is it normal that I don't see in the live_events panel payload my
'key': 'val'
?
Copy code
{
  "body": {
    "FORM": {},
    "JSON": {},
    "XML": {}
  },
  "endpoint": "https://www.google-analytics.com/collect",
  "files": {},
  "headers": {},
  "method": "GET",
  "params": {
    "cid": "cid",
    "ea": "Simple Track Event",
    "ec": "All",
    "ev": 0,
    "ni": 0,
    "t": "event",
    "tid": "UA-track-id",
    "uip": "11.11.11.11",
    "v": "1"
  },
  "type": "REST",
  "userId": "user-id",
  "version": "1"
}
n
This is the final event that is sent to GoogleAnalytics after transformation. If you want to check the event that you sent to RudderStack, check in the LiveEvents tab of the source
p
in the source pyload json I got the "properties" with the key/val, but after transformation (none was configured) I kind of lost the data ¿?
n
Can you check this doc https://docs.rudderstack.com/destinations/google-analytics-ga and see if it’s not working as expected
p
thanks! I'll check
I've checked several times, but I cannot get it working. Thanks to wireshark, I can see that the message goes through the rudder-server, to the d-transformer service, then to the rudder-server again, where there are several calls to google-analytics. But in the GA real time there are no data. I've repeated the tutorial from scratch, but I don't get the signal reaching out GA. Not sure what should be the next test.