We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 99a8a39 commit ce3bdecCopy full SHA for ce3bdec
modules/playgroundxyzBidAdapter.js
@@ -28,13 +28,21 @@ export const spec = {
28
* @return ServerRequest Info describing the request to the server.
29
*/
30
buildRequests: function (bidRequests, bidderRequest) {
31
- const topLocation = bidderRequest.refererInfo.referer;
+ const referer = bidderRequest.refererInfo.referer;
32
+ const parts = referer.split('/');
33
+
34
+ let protocol, hostname;
35
+ if (parts.length >= 3) {
36
+ protocol = parts[0];
37
+ hostname = parts[2];
38
+ }
39
40
const payload = {
41
id: bidRequests[0].auctionId,
42
site: {
- domain: window.location.protocol + '//' + topLocation.hostname,
- name: topLocation.hostname,
- page: topLocation.href,
43
+ domain: protocol + '//' + hostname,
44
+ name: hostname,
45
+ page: referer,
46
},
47
device: {
48
ua: navigator.userAgent,
0 commit comments