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

Read fbc & fbp from databag instead of relying on cookies #79

Closed
wants to merge 3 commits into from

Conversation

vahidkay-meta
Copy link
Contributor

When a cookie is set on the client side, the backend does not see that cookie on the first load. Therefore, fbc & fbp are always missed on the first load.

In this PR, we are reading those values from the payload that's sent to the backend by OpenBridge. This does not need to be done through setting cookies and instead we can rely on the payload itself.

This can be tested by:

  • Putting debug logs in either class-servereventfactory.php to see if fbp & fbc values exist in the user_data
  • Checking the match keys that are sent to EventsManager on the first call ( must make sure not to send an event twice, or load the page more than once )

@vahidkay-meta vahidkay-meta requested a review from iodic February 5, 2025 10:41
@facebook-github-bot
Copy link
Contributor

@vahidkay-meta has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@vahidkay-meta merged this pull request in f2e6512.

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

Successfully merging this pull request may close these issues.

3 participants