1.0.1 • Published 7 years ago

ng2-avrtix v1.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

ng2-avrtix NPM version build status coverage status

Easy Adverti SSP for Angular Applications

Demo: https://advertillc.github.io/ng2-avrtix

Install

npm install ng2-avrtix

Use

Add Adverti code

Use the standard Adverti SSP code somewhere in your <head></head> as you normally would

<script async src="//cdn.avrtix.com/v1/async.min.js"></script>

Import NgModule

Add AdvertiModule to the imports of your NgModule

import { AdvertiModule } from 'ng2-avrtix';

@NgModule({
  imports: [
    // shown passing global defaults (optional)
    AdvertiModule.forRoot({
      network: 'mynetwork',
      site: 1,
      placement: 1,
      width: 728,
      height: 90,
    }),
    ...

Show Ad

Uses global defaults which can be overriden via inputs

<ng-avrtix></ng-avrtix>

Inputs

inputtypedescription
networkstringthe network string-id, if whitelabel
sitestring/numberthe site id
placementstring/numberthe placement id
displaystringelement display style
heightnumberelement height in px
widthnumberelement width in px
hoststringCustom whitelabel host (DO NOT CHANGE UNLESS CONFIGURED CORRECTLY)
timeOutRetrynumberon first load sometimes avrtix is not ready. retry's push after x ms
<ng-avrtix
  [network]="'mynetwork'"
  [site]="1"
  [placement]="1"
  [width]="728" [height]="90"
  [host]="'mynetwork.avrtiz.com'">
</ng-avrtix>

Notes on custom host (Whitelabel clients)

To set the host configuration, you have to configure your subdomain/domain CNAME records and optionally the SSL configuration. Doing this will allow you mask Adverti's domains using your own domains. You can read more about it in this Help Center article.

1.0.1

7 years ago

1.0.0

7 years ago

0.0.1

7 years ago