@amalan-international/ads-placement
v1.0.12
Published
amalan ads placement web component
Downloads
11
Readme
Getting Started
Pre-requisites
You need to contact our team to get the CLIENT_API_KEY
and to register your domain on our server's whitelist
.
Installation
via npm
:
npm i @amalan-international/ads-placement
via cdn
:
<script src="https://cdn.jsdelivr.net/npm/@amalan-international/ads-placement"></script>
Usage
Import (ES6 Modules or Typescript) :
import AmalanAdsPlacement from 'amalan-ads-placement';
Initialize the CLIENT_API_KEY
and option
:
const amalan = new AmalanAdsPlacement('Your Client API Key', {
testMode: true, // default true, set to false for production usage
});
Call mount
method :
amalan.mount(); //this method will inject component to page
API Option
You can pass some optional method like create
to tell the package which banner type you want to use, you can call create
method as many as you want. the package will automatically prevent duplication base from the option
you set.
amalan.create({
ratio: '3:1',
selector: '.testing-big-banner-by-class', // can be class selector
});
amalan.create({
ratio: '1:1',
selector: '#testing-medium-banner-by-id', // can be id selector
});
// if you not pass the selector the banner will mount in fixed position
amalan.create({
ratio: '1:4',
});
fill
method will tell the package to prepopulate some basic information to the registration form.
amalan.fill({
email: '[email protected]', // optional
phone_number: '+62816xxxxxx', // optional
full_name: 'Jhon Mayor', // optional
});
Note : Make sure the mount
method is called last.
Available Banner Ratio
Demo
https://web-dev-aws.amalan.xyz/id/tentang-kami-ads-placement
https://aws-dev.amalan.xyz/admin/ads-placement
https://lp.amalan.com/ads-placement-sandbox/
Contact
amalan International - [email protected]
Project Link: https://github.com/amalan-international/ads-placement