This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@zeus-technology/load

1.4.4 • Public • Published

@zeus-platform/load

Build Status

The purpose of the zeusLoader function is to simplify the loading of the Zeus library. This function interfaces with the hosted Zeus libraries which control bidding, key-value-pair management, as well as the delivery and display of creatives.

This function itself only deals with the <script /> element which loads the hosted Zeus Technology script, and it should be used in conjunction with the ZeusAd React component, which will embed the advertisement element in to a given React application.

Note on performance

Regardless of how you load Zeus Technology into your site, be certain to always have Zeus Technology as the first tag that runs on your site. This way, Zeus can start loading its code and have the bidding engine ready by time ZeusAd components or zeus-ad HTML tags are created in the DOM.

Usage

In cases of statically rendered React, where HtmlWebpackPlugin is being used, we recommend passing the output of this function as a template parameter. In more complex situations, such as server-side rendering, you may be able to run this function a single time for all users.

// webpack.config.js
const { zeusLoader } = require("@zeus-technology/load");
// ...

module.exports = {
  // ...

  plugins: [
    new webpack.HtmlWebpackPlugin({
      template: "src/index.html",
      zeusTag: zeusLoader({
        url: `https://my-site-name.zeustechnology.${
          dev ? "io" : "com"
        }/main.js`,
      }),
    }),
  ],
};

Then, in your template...

<!DOCTYPE html>
<html>
  <head>
    <%= htmlWebpackPlugin.options.zeusTag %> ...
  </head>
</html>

Readme

Keywords

none

Package Sidebar

Install

npm i @zeus-technology/load

Weekly Downloads

2

Version

1.4.4

License

MIT

Unpacked Size

7.46 kB

Total Files

8

Last publish

Collaborators

  • fenstamaker
  • john.conway
  • jonnyd55
  • manchicken
  • thomas-thepost
  • zeus-gam