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

Adtelligent support both userSync types #3444

Merged
merged 11 commits into from
Jan 31, 2019

Conversation

GeneGenie
Copy link
Contributor

Type of change

  • Feature

Description of change

Adapter response may provide sync type.

PS: Tests updated

Copy link
Collaborator

@bretg bretg left a comment

Choose a reason for hiding this comment

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

The point of the userSync type is that you should use iframe if the publisher supports it, else image. You shouldn't need BOTH iframe and image types in the same sync.

Please update this code so it has more selective behavior, or help me understand why you need both formats.

if the pub allows iframes, use the iframe version of the sync
else if the pub allows images, use the image version of the sync

Also, the way this code is structured, it's assumed that values in cookieURLs can be either iframes or images. Is that true in your case? If so, how? Your usersync server will need to respond with the appropriate thing: either a block of html or an image. How can the server know which type of request this is without something in the URL?

@GeneGenie
Copy link
Contributor Author

GeneGenie commented Jan 23, 2019

@bretg Yes, your comment makes perfect sense. I think this change was requested to avoid pre-integration work with publishers.
Anyway, I will change the code.

Your usersync server will need to respond with the appropriate thing: either a block of html or an image. How can the server know which type of request this is without something in the URL?

This could be achieved by checking content-type of request, either it's an image or document.

Copy link
Collaborator

@bretg bretg left a comment

Choose a reason for hiding this comment

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

If I'm misunderstanding the point behind your dropping syncs for both pixel AND iframe, please help me understand.

})

describe('user syncs as iframe', function () {
it('should be returned if pixel enabled', function () {
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 you mean 'should be returned if iframe enabled'


expect(syncs.map(s => s.url)).to.deep.equal(SERVER_DISPLAY_RESPONSE.cookieURLs);
expect(syncs.map(s => s.url)).to.deep.equal(SERVER_DISPLAY_RESPONSE_WITH_MIXED_SYNCS.cookieURLs);
Copy link
Collaborator

Choose a reason for hiding this comment

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

So again - the original idea behind usersync was that iframes would be used if they were allowed by the pub and that image syncs were a fallback. We wouldn't expect both types of syncs if both are allowed. Just iframe. Trying to minimize the number of syncs here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry. Did not get your point.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

if two syncs are required, and everything is allowed, then 2 syncs are called as expected. Our lineItems may require triggering multiple syncs for single bid, and their types do not matter.

@GeneGenie
Copy link
Contributor Author

Yieldbot test failing CI here.

@bretg bretg merged commit 596af88 into prebid:master Jan 31, 2019
@bretg
Copy link
Collaborator

bretg commented Feb 1, 2019

Note that this is only in the master (2.x) branch right now. If you need it in the 1.40.x-legacy branch, will need to be copied there.

@GeneGenie
Copy link
Contributor Author

@bretg yeaaaah, I also need this change in 1.40

jacekburys-quantcast pushed a commit to jacekburys-quantcast/Prebid.js that referenced this pull request May 15, 2019
* Add user sync pixel logic in Adtelligent adapter

* Add gdpr support

* Add gdpr support

* Update tests

* Support both types of user syncs

* More logical code with syncs

* Remove "only" from test

* Update test messages
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.

2 participants