Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Returns 200 but also "{success: false}" for Purchase event #25

Open
pakaplace opened this issue Aug 31, 2023 · 4 comments
Open

Returns 200 but also "{success: false}" for Purchase event #25

pakaplace opened this issue Aug 31, 2023 · 4 comments

Comments

@pakaplace
Copy link

Hello,

Thank you very much for making this library - the FB conversions API is tough.

image image

I'm getting a 200 back from the fb-events API, but it's returning {success:false}

It's hard to debug why this is occuring since there's no error message. I generated an access token and pixel, which are both in my .env. In my test events page on facebook, no server-side events are picked up on.

Any idea why this might be? Thanks again.

@pakaplace
Copy link
Author

pakaplace commented Sep 1, 2023

Haha, I realized I kept the #true in the same line after the debug env variable. Now I'm getting this error:
image

I logged the event data being sent by server-side-events.js and it appears as follows
image

Btw, I got my access token from the event manager. Test events (using facebook's gui, not this library) did work:
image

@ovdahlberg
Copy link
Contributor

Hi @pakaplace,

Could you please share the fbEvent with arguments that you are trying to execute?

@pakaplace
Copy link
Author

Thanks - this is the fbEvent with arguments I'm executing

      fbEvent({
        eventName: "Purchase", // ViewContent, AddToCart, InitiateCheckout, Purchase etc.
        // eventId: user?._id, // optional, unique event id's will be generated by default
        emails: [user.email], // optional
        firstName: user?.firstName, // optional
        lastName: user?.lastName, // optional
        products: [
          {
            // optional
            sku: "MONTHLY",
            quantity: 1,
          },
        ],
        value: 60, // optional
        currency: "USD", // optional
        enableStandardPixel: false, // default false (Require Facebook Pixel to be loaded, see step 2)
      });```
      

@SpeightPLab
Copy link

Hey @pakaplace did you solve this one? i'm seeing the same here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants