Sponsored Display SDK
Embed this SDK script in your HTML or use a tag manager to start running banner ads on your website.
Step 1: Find Your UUID, Hostname, and Ad Placement ID
To properly configure the SDK, you’ll need:
- UUID: Your marketplace's unique identifier.
- Hostname: The URL of your GoWit dashboard. If you used our self-service onboarding, this will be
cloud.gowit.com
. - Ad Placement ID: The identifier for the specific ad placement where the ads will appear on your website. You can find your Ad Placement IDs in the "Ad Placements" tab on the GoWit dashboard.
Step 2: Modify the SDK Script
Replace the placeholders in the script below with your specific values:
YOUR_UUID_HERE
: Replace with your marketplace UUID.YOUR_HOSTNAME_HERE
: Replace with your GoWit dashboard hostname.YOUR_PLACEMENT_ID_HERE
: Replace with the Ad Placement ID.
<script type="text/javascript">
(function () {
if (!window.top.document.getElementById("retail-ads-library")) {
var script = document.createElement("script");
script.type = "text/javascript";
script.defer = true;
script.id = "retail-ads-library";
script.src = "https://sdk.gowit.com/index.js";
window.top.document.getElementsByTagName("head")[0].appendChild(script);
}
(window.top.retail_ads = window.top.retail_ads || []).push({
ad_type: "banner",
api_url: "YOUR_HOSTNAME_HERE",
marketplace_id: "YOUR_UUID_HERE",
page_number: 1,
placements: [{ placement_id: YOUR_PLACEMENT_ID_HERE }],
adFailed: function () {
console.log("Ad Failed To Load");
},
adLoaded: function () {
console.log("Ad Loaded");
},
});
})();
</script>
Step 3: Add the Script to Your HTML Page
Once you've customized the script, add it to the bottom of the <body>
tag on any page where you want to display banner ads.
<body>
<!-- Your website content here -->
<!-- Add the script just before the closing body tag -->
<script type="text/javascript">
<!-- Your customized script -->
</script>
</body>
Need Help?
If you have any questions, encounter issues, or need further assistance, please don't hesitate to reach out:
- Email: [email protected]
Updated 3 months ago