You can use our sample Python script to send metrics in Metrics 2.0 or 3.0 protocols; refer to GitHub for more details.
Metrics 3.0 example:
[ { "schemaId": "111111-22222-3333-4444", "timestamp": 143876178, "dimensions": { "Geo": "US", "Device": "Mobile", "ProductCategory": "Shoes" }, "measurements": { "measure1": 10, "measure2": 25.5 }, "measurementsCount": { "measure1": 10, "measure2": 25.5 }, "tags": { "ActiveCampaignID": [ 1234 ], "AccountManagers": [ "JohnDoe", "MaryJane" ] } } ]
Metrics 2.0 example:
[ { "properties": { "what": "NumberPurchases", "Geo": "US", "Device": "Mobile", "ProductCategory": "Shoes", "target_type": "counter" }, "tags": { "ActiveCampaignID": [ 1234 ], "AccountManagers": [ "JohnDoe", "MaryJane" ] }, "timestamp": 143876178, "value": 58 } ]