Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
npm
/
gltracker
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit b49d6499
authored
Jul 04, 2022
by
杨北旺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
添加埋点开关配置
1 parent
5cc31762
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
src/main.js
src/main.js
View file @
b49d649
...
...
@@ -7,7 +7,8 @@ const defaultData = {
server_url
:
'http://tracking-backend.test.glsx.com/track'
,
send_timeout
:
6000
,
max_length
:
10
,
show_log
:
true
show_log
:
true
,
switch
:
true
}
const
commonData
=
{}
function
init
({
settings
,
common
,
getTitle
})
{
...
...
@@ -372,6 +373,9 @@ tracker.trackEvent = trackEvent
tracker
.
sendStrategy
=
sendStrategy
// eventType 事件类型 properties 业务对象 callback 回调
tracker
.
track
=
function
(
properties
,
eventType
=
'click'
,
callback
)
{
if
(
!
defaultData
.
switch
){
return
}
this
.
trackEvent
.
send
(
{
type
:
'track'
,
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment