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

Prebid Core: Implement transaction id on imp.ext.tid #8591

Merged
merged 3 commits into from
Jun 22, 2022

Conversation

shahinrahbariasl
Copy link
Contributor

Type of change

  • Bugfix
  • Feature
  • New bidder adapter
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Does this change affect user-facing APIs or examples documented on http://prebid.org?
  • Other

Description of change

Addresses #8543 (add imp[].ext.tid to openrtb2Imp object).

Tested locally and added unit tests.

Other information

https://github.com/InteractiveAdvertisingBureau/openrtb/blob/master/extensions/community_extensions/per-imp-tids.md

@jsnellbaker jsnellbaker requested a review from mmoschovas June 21, 2022 18:28
@jsnellbaker jsnellbaker added feature needs 2nd review Core module updates require two approvals from the core team labels Jun 21, 2022
@@ -616,6 +616,27 @@ export const startAuction = hook('async', function ({ bidsBackHandler, timeout:

adUnit.transactionId = generateUUID();

// Populate ortb2Imp.ext.tid with transactionId. Specifying a transaction ID per item in the ortb impression array, lets multiple transaction IDs be transmitted in a single bid request.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this whole block could be replaced by

deepSetValue(adUnit, 'ortb2Imp.ext.tid', adUnit.transactionId)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nice! Addressed.

@@ -2200,7 +2200,7 @@ describe('IndexexchangeAdapter', function () {
expect(diagObj.mfu).to.equal(2);
expect(diagObj.allu).to.equal(2);
expect(diagObj.version).to.equal('$prebid.version$');
expect(diagObj.url).to.equal('http://localhost:9876/context.html')
expect(diagObj.url).to.exist
Copy link
Collaborator

Choose a reason for hiding this comment

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

not sure if I'm OK with this - it should be changed to expect the current port. I believe it's also not the only test that fails when the port chages. In this context I think it'd be better to revert it, and deal with the annoyance of killing stray karma processes until we fix all the tests.

Copy link
Contributor Author

@shahinrahbariasl shahinrahbariasl Jun 21, 2022

Choose a reason for hiding this comment

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

Yeah this was to avoid failure in the test pipeline when the port is already being used and it gets incremented to 9877.

@patmmccann patmmccann changed the title Imp ext tid Prebid Core. Implement transaction id on imp.ext.tid Jun 21, 2022
@patmmccann patmmccann changed the title Prebid Core. Implement transaction id on imp.ext.tid Prebid Core: Implement transaction id on imp.ext.tid Jun 21, 2022
@patmmccann patmmccann linked an issue Jun 21, 2022 that may be closed by this pull request
@patmmccann patmmccann merged commit 0cb87ac into prebid:master Jun 22, 2022
renebaudisch pushed a commit to renebaudisch/Prebid.js that referenced this pull request Jun 28, 2022
* add transactionId to openrtb imp ext object

* fix unit test

* address feedbacks

Co-authored-by: shahin.rahbariasl <[email protected]>
jlaso pushed a commit to AuDigent/Prebid.js that referenced this pull request Jul 1, 2022
* add transactionId to openrtb imp ext object

* fix unit test

* address feedbacks

Co-authored-by: shahin.rahbariasl <[email protected]>
bwhisp pushed a commit to bwhisp/Prebid.js that referenced this pull request Jul 13, 2022
* add transactionId to openrtb imp ext object

* fix unit test

* address feedbacks

Co-authored-by: shahin.rahbariasl <[email protected]>
jorgeluisrocha pushed a commit to jwplayer/Prebid.js that referenced this pull request Sep 15, 2022
* add transactionId to openrtb imp ext object

* fix unit test

* address feedbacks

Co-authored-by: shahin.rahbariasl <[email protected]>
jorgeluisrocha added a commit to jwplayer/Prebid.js that referenced this pull request Sep 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature needs 2nd review Core module updates require two approvals from the core team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Intent To Implement: Transaction IDs Community Extension
6 participants