Connecting API & Setting cookies in Bubble

Hello community,

I need your help in order to integrate the “First Promoter API” in my Bubble website to track sales & commissions ( API Reference)

I’m having trouble while getting the response of the API, I think I might need to add some cookies in my bubble website or to connect in a different way my workflow.

If someone have 5 minutes to give me to solve this problem ! I’m a real beginner please don’t destroy me for the set ip :sweat_smile:

Here are some screen shot of my API settings and my actual workflow.

I’m not sure if it’s correct to do a JavaScript call. Should I need to connect a backend workflow with the First promoter API ?

As you can see I’m a bit lost, thanks in advance for your help

Hi there,

What is the error you’re getting?

The approach in general looks correct, the script looks incomplete? what is that for?

Hey Olivier,

Thanks for the answer.

Here attached the picture of the error I’m getting from the FirstPromoter tool when I’m testing the tracking.

I put the JavaScript (2nd step) code in order to get the information from the Chekout Stripe validation(1st step) and share this to the FirstPromoter API (3rd step) so I can “track the sales” with the customer_ID and all the variable I put In the API.

At the end I get the information in the Debug view but nothing is send to the API as the tracking test failed.

Thanks for your help,

I’m also questioning myself if the error doesn’t come from cookies _fprom_tid & _fprom_ref. I don’t know how to set them up.


Personally what I would be doing is storing the ref_id in your database instead, looking at their docs:

Alternative : In some special cases, you can refer sign ups directly to a promoter, by passing the referral id through ref_id parameter. Be careful using this because the referral id can be modified by the promoter by default, however you can disable that from the campaign configuration page.

So then from what I can see you would just be sending the tracking api calls when purchases are made or refunds needed etc, rather than needing cookies

Would like to give a big thank you to Oliver who help me to find the solution !

Thanks a lot mate,


1 Like