Skip to content

wanderBee/adshare-jssdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

adshare-jssdk

NPM Version

NPM Badge

Install

$ git clone https://github.com/wanderBee/adshare-jssdk
$ yarn

build

$ yarn build

Load

HTML

<script src="https://cdn.jsdelivr.net/npm/adshare-jssdk@0.3.1/dist/launchAd.min.js"></script>

ES6

import LaunchAd from "adshare-jssdk";

usage

prepare

login in dsp platform for advertising settings

in your file

/**
 * 初始化initConfig 尽量保证被最先加载
 * 比如 html 引入,可放到 </head> 上方
 */
LaunchAd.initConfig({
  async: true  // 是否异步执行js api
  noIframe: false // 是否跳出iframe,true则跳出;默认为false 页面被嵌入到iframe中
});

/**
 * 转化收益上报
 * @param uuid [String][必传] 分发用户标识
 * @param phone [String][必传] 转化手机号
 * @param actionId [String][非必传] // 转化ID (dsp platform配置)
 */
LaunchAd.report({
  uuid: "",
  actionId: "",
  phone: ""
});

License

MIT

About

广告分发JS SDK

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published