This repository has been archived by the owner on Feb 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
xuebin
committed
Apr 2, 2020
1 parent
d1dbc8a
commit 85ced43
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
BaseProvider = require './base' | ||
Common = require '../common' | ||
|
||
module.exports = | ||
class Aplus extends BaseProvider | ||
name: 'aplus' | ||
|
||
constructor: (@account) -> | ||
script = document.createElement('script') | ||
script.type = 'text/javascript' | ||
script.id = 'beacon-aplus' | ||
script.src = '//g.alicdn.com/alilog/mlog/aplus_v2.js' | ||
script.setAttribute('exparams', 'clog=o&aplus&sidx=aplusSidx&ckx=aplusCkx') | ||
script.async = true | ||
script.defer = true | ||
|
||
# 部署位置原则上在body标签之后, 越靠前越好, 最好是body内第一行 | ||
body = document.getElementsByTagName('body')[0] | ||
body.insertBefore(script, body.firstChild) | ||
|
||
event: (gtaOptions) -> | ||
for property, value of gtaOptions | ||
gokeys.push "#{property}=#{value}" | ||
|
||
gokey = gokeys.join('-') | ||
|
||
window.goldlog?.record(@account, 'CLK', gokey, 'GET') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters