It seems like I'm getting very few FBP and FBC val...
# support
c
It seems like I'm getting very few FBP and FBC values passed into Facebook, both according to the events manager in FB, but also looking at the tracks table directly, I also see similar results, nearly all of my tracked events no longer have any FBC or FBP.. they for sure used to have nearly 100%.... Have browsers updated to kill these cookies? How are you all now getting /sending FBP and FBC in your track calls? Here is my code (I've edited out bits so if it looks like there is some missing } or some error, there isn't .. it runs without errors and occasionally succeeds in grabbing an FPB and FBC) Are you all capturing and storing the FBC cookie into your own custom cookies so they can still be sent server side? All of my track events fire on pages that would no longer have the FBCLID in the URL string, the track event fires on the "thank you" page after a form is submitted, which by that point the FBCLID is gone/needs to be fetched from a cookie. Or are browsers now stripping the FBCLID out of the URL string entirely? While I know I could likely answer this question with some testing, thought I would ask here in case anyone already did the testing and knows the solve...and in case any others are having the issue, if nobody updates.. I'll do some tests and post my results here.
Copy code
var urlParams = new URLSearchParams(window.location.search);
console.log(urlParams);
var gaUserId = '';
if (document.cookie.match(/_ga=(.+?);/)) {
  gaUserId = document.cookie.match(/_ga=(.+?);/)[1].split('.').slice(-2).join(".")
}
var fbpCookie = document.cookie.match(/_fbp=(.*?);/);
var fbcCookie = document.cookie.match(/_fbc=(.*?);/);
var msftCookie = document.cookie.match(/_uetmsclkid=(.*?);/);
var gclidCookie = document.cookie.match(/gclid=(.*?);/);
var gclid = "";
var fbp = "";
var fbc = "";
var MSCLKID = "";
var phone ="";
if (gclidCookie) {
  gclid = gclidCookie[1];
}
if (msftCookie) {
  var msclkidValue = msftCookie[1];
  MSCLKID = msclkidValue.substring(4);
}
if (fbpCookie) {
  var fbpValue = fbpCookie[1];
  var parts = fbpValue.split(".");
  fbp = parts.slice(0, 4).join(".");
}
if (fbcCookie) {
  var fbcValue = fbcCookie[1];
  var parts = fbcValue.split(".");
  fbc = parts.slice(0, 4).join(".");
}
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
    });

rudderanalytics.track("OptIn", {
      email: email,
      phone: phone,
      },
      {
      gaUserId: gaUserId,
      fbp: fbp,
      fbc: fbc,
      MSCLKID: MSCLKID,
      gclid: gclid
      }
    );
  }
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.
h
A mix of all you say, browsers are more strict now with 3rd party cookies plus safari on ios17 strips some tracking params and others are/will follow suit https://www.collectivemeasures.com/insights/are-you-ready-for-ios17
🙏 1
g
This is new to me. Curious to know the outcomes of the testing.
m
Can you provide the browser name and version where you are not seeing the fbp and fbc ids. We may be able to narrow down based on that. I don't think it is an implementation issue so I feel browsers are getting stricter about these ids. Also can you provide info on the website where you are tracking these?
c
@shy-kite-21035 - thanks for your help. https://www.creditsuite.com and various pages of https://info.creditsuite.com < our landing pages To figure out what browsers/versions don't have them I'd need to write some SQL or have some other way to query the tracks or pages table. At the moment it's more of a general sense that I'm sure our FBC in Facebook events was wayyyyy higher than 5% when I first switched Facebook pixel from GTM to Rudderstack about a year ago
m
Oh ok. I ll check with the team if any other customer has mentioned that they are seeing a drop in the % of events with fbc parameter.