Display targeted referral ads on your website and earn passive income. This guide walks you through every step — from getting your Publisher ID to adding the ad code. Start earning today with Patra Setu.
We offer 4 different ad types to match your website layout.
To use one, just copy its unique identifier and add it to the loadAds() function.
Your Publisher ID is a unique identifier that links your earnings to your account. You'll need this to set up the ad code on your website.
First, open patrasetu.in/referral-program in your browser. Enter the email address and OTP that you used when you created your Patra Setu Referral account. If you not registered your account, click on "Register" and download patra setu app also create new account.
After you successfully log in, you will land on your Dashboard. Now scroll down until you see the Referral Link Section. In this section you will find your unique Publisher ID. like (39303731313430353039) This ID connects all the ads and orders to your account. Click the Copy button next to your Publisher ID and keep it safe. You will need to paste this ID while setting up the ad library on your website.
Once you have your Publisher ID, you can add the referral ad code to your website. The code is lightweight and will display targeted ads based on your content.
To start showing ads on your website, you first need to add the Patra Setu ad library.
Copy the script code given below and paste it inside the <head> section of your HTML file.
The <head> section is usually found at the top of your page, right after the opening
<html> tag and before the <body> tag.
Adding it here ensures the ads load correctly on every page of your website.
<!-- Patra Setu Ad Library -->
<script src="https://www.patrasetu.in/cdn/Ads/referral-add.js"></script>
<link rel="stylesheet" href="https://www.patrasetu.in/cdn/Ads/ad-style.css">
Next, decide where you want the ads to show up on your website.
Add a container <div> in that spot. This div acts as a placeholder for the ad.
You can name the id anything you want, but it must be unique on that page.
For example, you can use id="patrasetu-ad-1" or id="sidebar-ad".
Just make sure no other element on the same page uses the same ID. Later, we will connect this ID
in the loadAds() function so the ad appears inside this container.
<!-- Ad Containers -->
<div id="ad-referral1"></div>
<div id="ad-referral2"></div>
<div id="ad-referral3"></div>
<div id="ad-referral4"></div>
The final step is to initialize the ad library. Copy the script tag below and paste it at the very end of your HTML page,
right before the closing </body> tag. Placing the script here ensures that your entire page loads first,
and then the ads are loaded into the <div> containers you created.
In the loadAds() function, replace the placeholder with your unique Publisher ID like (39303731313430353039) and the unique div ID you chose.
<!-- Initialize Ads -->
<script>
// Remember loadAds(containerId, adType, publisherId)
// Page-in-Poster - Full width poster ad
loadAds('ad-referral1', 'page-in-poster', 'YOUR_PUBLISHER_ID');
// Page-in-Banner - Standard banner ad
loadAds('ad-referral2', 'page-in-banner', 'YOUR_PUBLISHER_ID');
// Widget Sidebar - Vertical sidebar ad
loadAds('ad-referral3', 'widget-side-bar', 'YOUR_PUBLISHER_ID');
// Android Banner - Mobile-first banner
loadAds('ad-referral4', 'android-banner', 'YOUR_PUBLISHER_ID');
</script>
Tip: You can use multiple ad types on the same page. Just make sure each container has a unique ID.
Our integration team is available to help you complete the setup quickly. If you face any issues while adding the code, finding your Publisher ID, or displaying ads on your website, feel free to contact our support team. We’re happy to guide you through the entire process.