Support > Publisher > Integrate Adverts with Javascript

Integrate Adverts with Javascript (#2103)

(Last Update: 31.03.2021)

You can create your individual Javascript advert tag in the user interface under [[Implementation]]. This is a pretty easy task. Simply ad a few details and copy the final code into your website. Our system will return adverts in an asynchronous (non-blocking) mode, meaning your website loading will not be affected. Adverts will be injected as soon as a response from our adserver is received. That usually happens pretty quick.

A. Example Code for Native Text Adverts

<script type="text/javascript" data-params="jsads">
     m3ads_system = "Solads";
     m3ads_partnernumber = 1234; // Your Publisher ID
     m3ads_containerclass = "M3Adverts"; // Name of Advert Container
     m3ads_sectors = "2007"; // Use Single Channel Number only
     m3ads_numberadverts = 10; // Number of Adverts
     m3ads_includeimages = 1; // Logo on/off
     m3ads_logoimagewidth = 90; // Logo Width
     m3ads_logoimageheight = 53; // Logo Height
     m3ads_cssurl = "mypath/mystyles.css"; // Path to your stylesheet
     m3ads_subpartner = "subpartner01"; // SubID-String
<script type="text/javascript" src="//">

B. Example Code for Banner Adverts

<script type="text/javascript" data-params="jsads">
     m3ads_system = "Solads";
     m3ads_partnernumber = 1234; // Your Publisher ID
     m3ads_sectors = "2009"; // Use Single Channel Number only
     m3ads_numberadverts = 1; // Number of Adverts, use 1 here
     m3ads_imagewidth = 300; // Banner Width
     m3ads_imageheight = 250; // Banner Height
     m3ads_subpartner = "subpartner01"; // SubID-String
<script type="text/javascript" src="//">

The following options are available to customize your tag:

Your Publisher ID
Enter your publisher id here so activity can be tracked against your account.
Submit Channel ID
Enter a channel id here. Please use a separate tag for each individual channel. Note that channel ids for 'Native Ads CPC' and 'Banner CPM' are always different.
Define max number of adverts
Submit Sub-Partner String
this can be an individual string, eg for a subpartner, a subsite or a specific section of your site
3rd Party Click Tracking (recommended)
Optional, for custom click tracking. The click through URL, IP address and chargeability flag are sent as POST data to the 3rd party tracking service. For correct tracking in Google DFP please use the DFP click macro %%CLICK_URL_UNESC%%.
3rd Party Click Tracking with Click Forwarding (deprecated)
Optional, for custom click tracking. Usually requires own parameter (e.g., tracking =) for the campaign click url, which is appended to the adserver URL. The click is sent to the 3rd party adserver, which then does its processing and forwards on to the advertiser landing page. This mechanism is vulnerable to mistakes in the chain of clicks and the availability of the tracking server. Failures result in the browser not arriving at the advertiser's website and clicks not being registered. We recommend to use m3ads_publishertracking.
Track page URL against site table
The parameter can be used to record traffic from a particular site against your site table if it is not possible to pass the referrer via the request header. Please note that data is only recorded if a suitable entry has been created in the site table beforehand. The value of this parameter does not replace the real referrer sent to the system.
Pass user consent
Declare if you have user consent to enable processing of Personally Identifiable Information (PII) as per Regional Data Regulation Laws. Values are 1 for consent or 0 for no consent. Default value if empty or not defined is 0 (no consent).

Only relevant for display adverts

Banner width in Pixel
Banner height in Pixel
Minimum Bid for Banners
Required Minimum Bid in EUR cents, e.g. 0.35

Only relevant for text adverts

Turn images on/off
1 = on. 0 = off
Image width in pixel
Image height in pixel
Path to your css file
Define path to your own css file if you want to apply your invidual styling
Class of Advert Container
Class of Advert Container as defined in your CSS

Only relevant for Interstitial

Time in seconds until interstitial layer is closed automatically
0 to disable autohide
Time in minutes before the layer is shown again to the same user
Any number or "session" to show interstitial once per browser session.