Highlights
-
Fbc/Fbpnow parse the cookie values Meta writes today (#13). Two real-world shapes were previously rejected:- click ids containing
-or_— realfbclidvalues are base64url, e.g.fb.1.1657051589577.IwZXh0bgNhZW0CMTAAAR-uK_5w; - the trailing appendix segment that Meta's own parameter builder (
facebook/capi-param-builder-php) appends, e.g.fb.1.1657051589577.1088522659.AQEAAQMB.
The
_fbpcase was the damaging one: the rejected value made servers fall back to generating a freshfbpon every request, silently degrading Event Match Quality while the browser held a stable value. - click ids containing
-
Byte-for-byte round-tripping — new
Fb::getAppendix()/Fb::withAppendix(), andvalue()writes a parsed appendix back unchanged, so a value read from a cookie is never rewritten into a different shape. The appendix is carried, not interpreted.
Compatibility
No backwards-compatibility breaks. value() only gains a fifth segment for values that were parsed with one; existing four-segment values round-trip exactly as before. One deliberate behavioural change: click ids with -/_ (previously rejected) are now accepted — that is the fix.
Under the hood
- Test coverage stays at 100 % line coverage with a 94 % mutation score: base64url click ids, both appendix lengths round-tripping for
FbcandFbp, appendix survival through the immutable setters, and rejection of malformed appendixes.
Requirements
Full changelog: v1.1.0...v1.2.0