1.0.1 • Published 7 years ago
ng2-avrtix v1.0.1
ng2-avrtix

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
input | type | description |
---|---|---|
network | string | the network string-id, if whitelabel |
site | string/number | the site id |
placement | string/number | the placement id |
display | string | element display style |
height | number | element height in px |
width | number | element width in px |
host | string | Custom whitelabel host (DO NOT CHANGE UNLESS CONFIGURED CORRECTLY) |
timeOutRetry | number | on 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.