@amalan-international/ads-placement
TypeScript icon, indicating that this package has built-in type declarations

1.0.12 • Public • Published

logo

Amalan Ads Placement

This package is used to embed advertising banners and forms for registration as amalan clients.

Demo · Documentation


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: 'jhon@email.com', // optional
    phone_number: '+62816xxxxxx', // optional
    full_name: 'Jhon Mayor', // optional
});

Note : Make sure the mount method is called last.

Available Banner Ratio

Data Type Value Need Selector?
string 9:1 optional
string 1:1 optional
string 1:4 optional
string 3:1 yes

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 - product@amalan.org

Project Link: https://github.com/amalan-international/ads-placement

Package Sidebar

Install

npm i @amalan-international/ads-placement

Weekly Downloads

6

Version

1.0.12

License

MIT

Unpacked Size

576 kB

Total Files

29

Last publish

Collaborators

  • yudaamalan
  • aldi-amalan