Pulling field data from Database Collection to tracking code for FirstPromoter

Hi guys,
I have created the database collection for a form and it is recording the data. I have the relevant field IDs and everything properly setup. The challenge is to pull the value/data from those fields into the following code.

$FPROM.trackSignup({
email:,
uid:},
function(){console.log(‘Callback received!’)});

This is the lead tracking code of FirstPromoter that I need to integrate into my site to track leads referred by affiliates.

The field IDs for Email and uid are:
_id
FirstName

I tried doing it using the following code but didn’t work:

$FPROM.trackSignup({
email:< wixData.insert(“LeadCapturesforAffiliates”, {" email": “value”});>,
uid:< wixData.insert(“LeadCapturesforAffiliates”, {“_id”: “value”});>},
function(){console.log(‘Callback received!’)});

Can anyone please help me set it up? Also, please let me know if it is only possible via creating hooks and integrating with Zapier?

Thanks in advance. Cheers!

PS: I posted this code in body text (upper)

You would be better suited going through FirstPromoter themselves and asking their own support team how to integrate it into Wix and if it is doable and Wix support it.
https://help.firstpromoter.com/en/
https://help.firstpromoter.com/en/articles/2001406-integrate-firstpromoter-with-zapier

Wix don’t provide support for third party apps and code that they have not had the chance to run and test fully on the Wix servers etc.

Also, as FirstPromoter have their own API, then I would look at using that instead through Wix Fetch.
https://docs.firstpromoter.com/#tracking-api

https://www.wix.com/corvid/reference/wix-fetch.html
https://support.wix.com/en/article/corvid-accessing-third-party-services-with-the-fetch-api