gulp-swiffy-banner

A gulp script that adds standard banner tags onto an exported Swiffy file for either Doubleclick(Generic) or Sizmek

Usage no npm install needed!

<script type="module">
  import gulpSwiffyBanner from 'https://cdn.skypack.dev/gulp-swiffy-banner';
</script>

README

Installation

Install package with NPM and add it to your development dependencies:

npm install gulp-swiffy-banner --save-dev

Usage

var swiffyBanner = require('gulp-swiffy-banner');

gulp.task('scripts', function() {
  return gulp.src('./src/swiffy.html')
    .pipe(swiffyBanner.google());
    .pipe(gulp.dest('./output/'));
});

gulp.task('scripts-sizmek', function() {
  return gulp.src('./src/swiffy.html')
    .pipe(swiffyBanner.sizmek());
    .pipe(gulp.dest('./output/'));
});

Options

  • google Makes the Swiffy HTML page compatible with google standard banners by adding clickTag and click code. Not compatible with DoubleClick Rich Media. These can also be used for site served banners as this is the standard most publishers will use.

  • sizmek Makes the Swiffy HTML page compatable with Sizmek. Can only be used for Standard HTML format or Polite HTML Sizmek formats.

Notes/Hints

  • Please note Sizmek supports IE9 whilst Swiffy only partially supports IE9 so please test your banners before uploading.
  • Please remove all flash clickTag code on the flash banners before putting through Swiffy as it may conflict with the javascript code.
  • I use npms like merge-stream to bulk process files and scripts to create an array from all the HTML files from a folder to speed up conversion.
  • This library may stop working if Swiffy is updated.

Links