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

[Question] How to get the domain of the site #7392

Closed
prebidtappx opened this issue Sep 8, 2021 · 4 comments
Closed

[Question] How to get the domain of the site #7392

prebidtappx opened this issue Sep 8, 2021 · 4 comments
Labels

Comments

@prebidtappx
Copy link
Contributor

prebidtappx commented Sep 8, 2021

Description

Hello,
We have a doubt about how to collect the domain of the sites where our Pbjs adapter is implemented.
Now we collect it with the document.location or from setConfig.pageUrl but we are having some issues:

  • With the pageUrl, we need the publishers to add in the code the domain and that's not what we want.
  • If we collect with the document.location, we find that many times we find domains that do not correspond to the real page, for example: translate.yandex.ru, translate.googleusercontent.com, copyscape.com (crawler)...

Could you tell us what would be the correct way to collect this parameter?

Thank you in advance!

@patmmccann
Copy link
Collaborator

patmmccann commented Sep 8, 2021

#5637 has some background on this; prebid attempts to figure out the page even when publishers don't set it. Prebid doc is pretty explicit that adapters should use bidderRequest.refererInfo, but if you don't like the way that is generated, we're certainly open to feedback. What we don't want is every adapter gathering it via its own function or method.

@prebidtappx
Copy link
Contributor Author

Hello,

thank you for your reply.
I've been checking and testing and there is one case that gives me problems.
When the site where you are using our adapter goes through another service (for example google translate), the domain becomes my-domain-com.translate.goog, complicating the task of getting the real domain.
Our intention is to receive it automatically without the publishers having to set it in the configuration.
Is there any way to deal with this?

Thanks in advance

@patmmccann
Copy link
Collaborator

In your example, y-domain-com.translate.goog is the "real domain". There is no non-config method to get what you're looking for that we've been able to imagine.

@stale
Copy link

stale bot commented Jan 8, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jan 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants