0.1.3 • Published 4 years ago

bury-com v0.1.3

Weekly downloads
3
License
ISC
Repository
github
Last release
4 years ago

bury-com

Introduction

`bury-com` is a common bury module for 58 HRG .

For more infomation , See (here)[https://github.com/liuding-Jason/bury-com]

Install

npm install bury-com --save

How to use

bury utils

`bury-com` would always be a common function , so it should be instanced in `utils` .
When used this moudle , you should do as bellow :

bury/index.js

import { Bury } from "bury-com" ;
import Logs from "./log" ;

// init 
const buryInstance = new Bury(Logs) ;

const bury = (type = "") => {
	type && buryInstance.bury.call(buryInstance , type) ;
} ;

module.exports = bury ;

bury/log.js

`bury-com` module could support all three different appearance , app 、mobile and pc .
when used on app , you should set your log as bellow : 
let pagetype = 'page' ;
let Logs = {
	'test_index_show' : {
		pagetype ,
		actiontype : 'page_show' ,
		opt : {}
	} ,
	'home_click' : {
		pagetype ,
		actiontype : 'page_click' ,
		opt : {}
	}
} ;

module.exports = Logs ;
And when used on mobile browser and pc , the settings should be :
let Logs = {
	'test_index_show' : {
		from : 'home_page_show' ,
		opt : {}
	} ,
	'home_click' : {
		from : 'home_page_click' ,
		opt : {}
	}
} ; 

module.exports = Logs ;

LINCESE

MIT
0.1.3

4 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago