Skip to content

Conversation

@sayan-das-in
Copy link
Contributor

@sayan-das-in sayan-das-in commented Sep 26, 2022

What does this PR do?
In Facebook Pixel and Facebook Conversions API (Actions) integrations, the eventId parameter is used to dedupe events, however Segment doesn't send eventId for Facebook Pixel Page events. This PR maps AJS messageId to Facebook's eventId.

Are there breaking changes in this PR?
No, this is a bug fix

Testing

Testing completed successfully in local environment with event tester
Facebook Pixel Dashboard

Any background context you want to provide?

Is there parity with the server-side/android/iOS integration components (if applicable)?
This PR is a bug fix which brings parity to Facebook Pixel Page Calls with Page Calls from Facebook Conversion API.

Does this require a new integration setting? If so, please explain how the new setting works
No

Links to helpful docs and other external resources
https://docs.google.com/document/d/19-PjSYJTH5tmKptMPXLBXPz3oF9c7sUpCSZ4TdyPYts

@sayan-das-in sayan-das-in changed the title HGI 81 - Add event ID to page calls sent to FB Pixel for deduplication [Stage] HGI 81 - Add event ID to page calls sent to FB Pixel for deduplication Sep 26, 2022
@sayan-das-in sayan-das-in changed the base branch from staging to master September 26, 2022 16:41
@sayan-das-in sayan-das-in changed the title [Stage] HGI 81 - Add event ID to page calls sent to FB Pixel for deduplication HGI 81 - Add event ID to page calls sent to FB Pixel for deduplication Sep 26, 2022
@sayan-das-in sayan-das-in requested a review from pooyaj September 27, 2022 06:06

FacebookPixel.prototype.page = function() {
window.fbq('track', 'PageView');
FacebookPixel.prototype.page = function(track) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also add a unit test to validate the new behavior?

@brennan
Copy link
Contributor

brennan commented Sep 27, 2022

@sayan-das-in The code looks good, but I think we should add at least one unit test to validate the new behavior/prevent future regressions. Thanks!

@Innovative-GauravKochar Innovative-GauravKochar requested review from pooyaj and varadarajan-tw and removed request for pooyaj November 29, 2022 07:40
@jony1993
Copy link

Hi there,

I came across this PR by accident today, because we also have the deduplication problem.
It would be extremely helpful for us to publish this fix, because we currently also have the deduplication issue for Facebook.

Are there any plans when this will be released?
Thanks for your work! :)

Copy link
Contributor

@pooyaj pooyaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great :shipit:

@jony1993
Copy link

@pooyaj @Innovative-GauravKochar
Thanks for merging it.

Maybe a stupid question, but when and how is it released? We are using the "Segment snippet" and Facebook Pageview Events are still duplicated...

@varadarajan-tw
Copy link
Contributor

Hey @jony1993 - We are working on releasing it. The rollout is expected to be completed by 1-2 days. I will keep you posted.

@varadarajan-tw
Copy link
Contributor

Hey @jony1993 - The changes should be available now. You can go ahead and test them.

@jony1993
Copy link

Hey @varadarajan-tw
Thanks. Seems to be working now :)

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

Successfully merging this pull request may close these issues.

7 participants