How to implement JavaScript code in the website?

Once your Popunder ads are approved, it's time to implement the JavaScript code into your website's header section. This will enable us to go live and start displaying Popup/Popunder ads to your viewers.

Edit the JavaScript code for your preferences:

Example:

<script type="text/javascript">
    var app_url = 'https://shrtfly.com/';
    var app_website_key = '25pvLRZ';
    var app_advert = 1;
    var app_frequency = 1;
</script>
<script src='https://cdn.shrtfly.vip/js/tag.js'></script>

You will notice two parameters that need to be defined before going live:

  1. app_advert: By default, this is set to 1 for mainstream ads. Use 2 for adult-oriented ads if your website is adult-themed.

If your website is a mainstream website you need to use value 1 or if you have an adult website then you should use 2 value, so according to this, we will show the ads on your website.

  1. app_frequency: You can control the frequency of the ads by editing this value, by default we use value 1 but you can adjust it according to your needs, make sure not to use it higher value, it may frustrate your viewers for too many ads.

We do not currently support specific time intervals between ads, so they will appear consecutively if you increase the ad frequency value above 1.

Once you have edited the code to your specifications, proceed to implement it on your website.

A step-by-step guide to implementing JavaScript code to the website.

  1. Log in to your website's admin area and navigate to Appearance > Theme Editor.

  2. Select the theme you have installed and locate the header.php file.

  3. Now, press CTRL + F to find the </head> tag in the header.php file. (If you're using a mobile phone, search manually.)

  4. Copy the edited code and paste it above the </head> tag, as shown in the screenshot below.

  5. Now click the "Update File" button to save it.

Popunder ads will now be implemented across your entire website, displaying popup ads when visitors access your site.

If you prefer to show ads on specific pages only, you can implement the code on those specific pages too.

If you are not using WordPress and using any other CMS, locate the equivalent </head> section and implement the JavaScript code there.

You can also implement this code in the body section; it will work and display the Popup/Popunder ads within the body of the page.

If you do not yet have a ShrtFly account but wish to try our popunder ads, you can easily register for an account.