Hello Amplitude team
I’m currently using React/Nextjs for the company’s app and we recently setup Amplitude in our codebase using the HTTP API method. The tracking of the events on the page button seems to be working as I could see the data reflected in our Amplitude account. However, when I inspect the event, the event_properties declared here which is url shows no value. This property is added for the purpose of tracking this particular url/page as I’m unsure how to include the pageView default setting. There are examples for the SDK method but not for the HTTP API. Appreciate if you could provide some insight on this. Currently, this is how we set up the api call;
try {
const _res = await axios.post(
'https://api2.amplitude.com/2/httpapi',
{
api_key: project_key,
events: e
{
device_id: deviceId,
event_type: 'signup_button',
event_property: {
url: router.asPath
}
}
]
},
{
withCredentials: false
}
);
} catch (error) {
alert(error);
}