Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Niass committed Sep 13, 2023
2 parents e652ef6 + d4203d2 commit f1c59a7
Show file tree
Hide file tree
Showing 50 changed files with 2,817 additions and 278 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/issue_tracker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
steps:
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@0d49dd721133f900ebd5e0dff2810704e8defbc6
uses: tibdex/github-app-token@0914d50df753bbc42180d982a6550f195390069f
with:
app_id: ${{ secrets.ISSUE_APP_ID }}
private_key: ${{ secrets.ISSUE_APP_PEM }}
Expand Down
95 changes: 95 additions & 0 deletions integrationExamples/gpt/adnuntius_example.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
<html>
<head>
<script async src="https://www.googletagservices.com/tag/js/gpt.js"></script>
<script async src="../../build/dev/prebid.js"></script>
<script>
var FAILSAFE_TIMEOUT = 3000;

var adUnits = [
{
code: 'div-gpt-ad-1683695049516-0',
mediaTypes: {
banner: {
sizes: [[320, 320]]
}
},
bids: [{
bidder: 'adnuntius',
params: {
auId: "201208",
network: "adnuntius",
bidType: 'netBid'
}
}]
},
];
var googletag = googletag || {};
googletag.cmd = googletag.cmd || [];
googletag.cmd.push(function() {
googletag.pubads().disableInitialLoad();
});

var pbjs = pbjs || {};
pbjs.que = pbjs.que || [];

pbjs.que.push(function() {
pbjs.setConfig({
enableSendAllBids: true,
targetingControls: {
alwaysIncludeDeals: true
},
userSync: {
syncEnabled: false
}
});

pbjs.setBidderConfig({
bidders: ['adnuntius'],
config: {
bidType: 'netBid'
}
});

pbjs.addAdUnits(adUnits);
pbjs.requestBids({bidsBackHandler: initAdserver});
});

function initAdserver() {
if (pbjs.initAdserverSet) return;
pbjs.initAdserverSet = true;
googletag.cmd.push(function() {
pbjs.que.push(function() {
pbjs.setTargetingForGPTAsync('div-gpt-ad-1683695049516-0');
googletag.pubads().refresh();
});
});
}

// in case PBJS doesn't load
setTimeout(function() {
initAdserver();
}, FAILSAFE_TIMEOUT);

window.googletag = window.googletag || {cmd: []};
googletag.cmd.push(function() {
googletag.defineSlot('/19660636/320x320', [320, 320], 'div-gpt-ad-1683695049516-0').addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
</script>
</head>
<body>
<h2>Adnuntius Prebid Adaptor Test</h2>
<h5>Ad Slot 1</h5>

<!-- /19660636/320x320 -->
<div id='div-gpt-ad-1683695049516-0' style='min-width: 320px; min-height: 320px;'>
<script>
googletag.cmd.push(function() {
googletag.display('div-gpt-ad-1683695049516-0');
});
</script>
</div>

</body>
</html>
Loading

0 comments on commit f1c59a7

Please sign in to comment.