Hi, two questions about Facebook Pixel destination...
# support
c
Hi, two questions about Facebook Pixel destination: 1. Facebook is reporting that events sent via the conversion API are being received hourly, and when I look at the graph of Events for the Facebook Pixel in Rudderstack, it also looks like events are sent hourly..... if that is actually happening, then can anyone explain why in Test mode, events are being deduplicated, and I can click on the 'server' button in event mode, and see server events in real time? Is Rudderstack sending in real time, and then sends again every hour? 2. It seems the FBP is never send in Cloud mode, but is nearly always being sent in device mode. Is there something I need to do to have FBP send in cloud mode? Background: We have 2 facebook Pixel destinations setup, one is set with the device mode toggled on, the other has it toggled off. Here is a video of everything described above: https://www.loom.com/share/8ab0893605664da2ae0fc6f73ffc8bb8
m
Hey There! 👋 Your message has been received by the RudderStack team. We will forward this request to your Technical Account Manager, and they will get back to you shortly. Please use the thread for any additional comments.
a
Hi, can you share the workspace id to check the first issue?
For 2nd issue In device mode, FBP is captured automatically by Facebook Pixel SDK. In cloud mode, you can send the fbp parameter under the context object. https://www.rudderstack.com/docs/destinations/streaming-destinations/fb-pixel/#fbp-and-external_id-method-not-recommended https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/customer-information-parameters#fbp
c
@acceptable-motorcycle-85971 workspace ID is creditsuite-jason for fbp. I want to continue using the recommended event_id method. Does sending the fbp force things to switch to the not recommended fbp and external_id method?
also, the documentation is incomplete/ not clear to me, what does this mean: the
fbp
parameter is taken from the
context.fbp
key-value pair? Where is this key-value pair? If we do decide to send fbp server side, how do I enable it to be sent?
a
can you share sample payload that you are using in cloud mode?
To send the
fbp
parameter in cloud mode. You can send using a context object.
Copy code
{
  "context": {
    "fbp": "fb.1.1554763741205.234567890"
  }
}
c
@acceptable-motorcycle-85971 I thought rudderstack automatically has the fbp? To send this I need to add some js to pull it from the cookie and then pass it with the track event?
Or is there some method from the sdk I can call to get it easier?
a
In device mode, it will be send automatically, But for the server side (cloud mode) user will need to send this rudderstack and then it will be passed to FB pixel.
1. Facebook is reporting that events sent via the conversion API are being received hourly, and when I look at the graph of Events for the Facebook Pixel in Rudderstack, it also looks like events are sent hourly..... if that is actually happening, then can anyone explain why in Test mode, events are being deduplicated, and I can click on the 'server' button in event mode, and see server events in real time? Is Rudderstack sending in real time, and then sends again every hour?
This issue is being raised with the respective team. I'll keep you posted.
c
@acceptable-motorcycle-85971 - the documentation for track and identify don't mention context... since the track call is what is sending everything, I would assume this needs to be sent via firing the track call... should it be nested inside the properties?
Copy code
rudderanalytics.track("Product Reviewed", {
  review_id: "12345",
  product_id: "123",
  rating: 3.0,
  review_body: "Good product."
  context: {
      fbp: "fb.1.1554763741205.234567890"
     }
})
^ or should it be included in the identify call, so that it is then passed to the track calls?
a
This is how you can include this in track call
Copy code
rudderanalytics.track(
  "Product Reviewed",
  {
    review_id: "12345",
    product_id: "123",
    rating: 3.0,
    review_body: "Good product.",
  },
  {
    fbp: "fb.1.1554763741205.234567890",
  }
);
You can include fbp parameter in both calls -> identify and track. Inside the context object as shown above
https://rudderstack.slack.com/archives/C01E4PLB135/p1678465174048639?thread_ts=1678305333.275199&cid=C01E4PLB135 RudderStack delivers the data to Facebook pixel in real-time only. The granularity of data points in RudderStack dashboard graph is 1 hour (which does not mean that data is being sent to facebook hourly). Facebook might take some time to reflect the received events on their dashboard.
c
@acceptable-motorcycle-85971 any update ^
a
@creamy-table-83685 Please ref this.
^ or should it be included in the identify call, so that it is then passed to the track calls?
If you include fbp parameter in identify then it will not be passed to track call. You have to include this parameter under context in the track call as well
Are you facing any issue with the above approach?
c
@acceptable-motorcycle-85971: Thanks for the follow up, I will be updating the track calls tomorrow. I also wanted to ask how to get rudderstack to _ remove _ some non standard PII. We have a business assessment where one of the questions is personal credit score. This ends up in a url param that Facebook receives. How do I enter this in the Deny List settings in both device mode and server mode so that the value is redacted out of the url params?
a
Allow/Deny list is not-applicable for non-standard PII properties. If you want to remove non-standard PII from the payload then you can add a transformation on the RudderStack dashboard https://www.rudderstack.com/docs/features/transformations/
c
@acceptable-motorcycle-85971... thanks.. for device mode/front end sounds like we just need to add our own custom .js to prevent the URL from going to FB with that info un-redacted? The transformation would only be server side? Also, the fbp is now sending as expected. Thanks!
also, data is showing as being sent real time, so that is also now working
a
Yes, user transformation only works on the server side. For device mode, you will need to add your custom js
a
Hey sorry to crash this thread, but I'm having similar issues. @creamy-table-83685 did you ever figure this out? Also would like to go with the recommended method, but the docs are a bit unclear on how to set that up. Currently, just set up two fb destinations for the same pixel, one in cloud mode and another in device mode and am not sending the FBP through on the server since I'm guessing that force things into the unrecommended deduping method
c
Hi @average-monkey-86292, yes I did get FBP sending both browser side (device mode) and server side. It did not trigger the unrecommended deduplication as far as I can tell and FB is green checkmarks on all things in the setup. Here is what made things work correctly: 1. Make sure you fire the identify call before you fire a track call... the things you identify (phone email etc) are then automatically sent to FB via the track call.... I had things flipped around initially.. and what you will see in the code below is some redundancy/ me working out how to make it work: Here is the identify call I have:
Copy code
rudderanalytics.identify(email, {
    email: email,
    phone: phone,
    firstname: firstname,
    lastname: lastname,
    gaUserId: gaUserId,
    fbp: fbp,
    fbc: fbc,
    MSCLKID: MSCLKID,
    gclid: gclid
    },
    {
     fbp: fbp,
     fbc: fbc
    });
I am nearly certain the fbp and fbc do not need to be passed in the block with the phone, first name, last name etc... but in order to not break anything... I left them as is.. to get fbp and fbc to pass server side, I needed to add that final
Copy code
{
fbp: fbp,
     fbc: fbc
}
Here is my track call... again I think I don't need to be sending the email and phone in that first { } ... and I don't even think I need to be sending the fbp, fbc or really any of the other stuff... since as I now understand it, having it all fired in the Identify call automatically adds it to the Track call...
Copy code
rudderanalytics.track("OptIn", {
      email: email,
      phone: phone,
      },
      {
      gaUserId: gaUserId,
      fbp: fbp,
      fbc: fbc,
      MSCLKID: MSCLKID,
      gclid: gclid
      }
    );
  }
a
@creamy-table-83685 awesome, thank you so much for replying. this is super helpful. right now I'm not even sending the FBP value via the track call, but the context bit is confusing - continuing to play with it. FWIW I found this library which works well as way to automatically capture some of these things and use them in these calls: https://github.com/pearmill/attribution.js
c
I am pretty sure you do not need to send FBP in the track call. Once you have it added to the Identify call, it should start passing with the Track call.
a
Yeah agree, I actually think it should do all the matching based on it sending the same "event_id" from both the server and client (the recommended way)
Also see you have been posting about Google Ads which is now what I'm about to implement 😂 - we'll have to work through this together
c
@average-monkey-86292 - please let me know if you get Google Ads working... I can't move it any further until I hear from rudderstack support.
a
@creamy-table-83685 will do - I'm gonna grind on it tomorrow. will comment in that same thread on one thing that I plan on doing