I currently have a custom event set up to capture user log in through Auth0 using Amplitude’s HTTP API. When I inspect the event in Users and Sessions I can see that it captured standard user properties like user id, device id, country, ect. I was wondering if it’s possible for me to send any custom data with this event. This is the code I wrote:
exports.onExecutePostLogin = async (event, api) => {<br /> const fetch = require('node-fetch');<br /><br /> const response = await fetch('https://api2.amplitude.com/2/httpapi', {<br /> method: 'POST',<br /> headers: {<br /> 'Content-Type': 'application/json',<br /> 'Accept': '*/*'<br /> },<br /> body: JSON.stringify({<br /> "api_key": event.secrets.API_KEY,<br /> "events": [{<br /> "event_type": "User log in"<br /> }]<br /> })<br /> })
Let’s just say for an example I wanted to capture the user email or log in time, would it be possible for me to capture this information? Currently, when I add a key value pair to the events array in the body like `email: myemail@gmail.com` this information isn’t captured.