Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
GMPhobos
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
GMPhobos
Commits
039fc56a
Commit
039fc56a
authored
Feb 08, 2021
by
艾娇平
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
之前没有进行实时上报的埋点,采用后端控制是否进行实时上报
parent
c772fde9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
NewPhobos.m
GMPhobos/Classes/NewPhobos.m
+6
-4
No files found.
GMPhobos/Classes/NewPhobos.m
View file @
039fc56a
...
@@ -397,11 +397,11 @@ static NewPhobos *_sharedClient;
...
@@ -397,11 +397,11 @@ static NewPhobos *_sharedClient;
}
}
+
(
void
)
track
:
(
NSString
*
)
eventName
{
+
(
void
)
track
:
(
NSString
*
)
eventName
{
[
self
track
:
eventName
attributes
:@{}
sendNow
:
[
NewPhobos
sharedClient
].
isGraySendNow
currentAPI
:
_sharedClient
.
serverAPI
];
[
self
track
:
eventName
attributes
:@{}
sendNow
:
NO
currentAPI
:
_sharedClient
.
serverAPI
];
}
}
+
(
void
)
track
:
(
NSString
*
)
eventName
attributes
:
(
NSDictionary
*
)
attributes
{
+
(
void
)
track
:
(
NSString
*
)
eventName
attributes
:
(
NSDictionary
*
)
attributes
{
[
self
track
:
eventName
attributes
:
attributes
sendNow
:
[
NewPhobos
sharedClient
].
isGraySendNow
currentAPI
:
_sharedClient
.
serverAPI
];
[
self
track
:
eventName
attributes
:
attributes
sendNow
:
NO
currentAPI
:
_sharedClient
.
serverAPI
];
}
}
+
(
void
)
track
:
(
NSString
*
)
eventName
attributes
:
(
NSDictionary
*
)
attributes
sendNow
:
(
BOOL
)
sendNow
{
+
(
void
)
track
:
(
NSString
*
)
eventName
attributes
:
(
NSDictionary
*
)
attributes
sendNow
:
(
BOOL
)
sendNow
{
...
@@ -409,16 +409,18 @@ static NewPhobos *_sharedClient;
...
@@ -409,16 +409,18 @@ static NewPhobos *_sharedClient;
}
}
+
(
void
)
track
:
(
NSString
*
)
eventName
currentAPI
:
(
NSString
*
)
currentAPI
{
+
(
void
)
track
:
(
NSString
*
)
eventName
currentAPI
:
(
NSString
*
)
currentAPI
{
[
self
track
:
eventName
attributes
:@{}
sendNow
:
[
NewPhobos
sharedClient
].
isGraySendNow
currentAPI
:
currentAPI
];
[
self
track
:
eventName
attributes
:@{}
sendNow
:
NO
currentAPI
:
currentAPI
];
}
}
+
(
void
)
track
:
(
NSString
*
)
eventName
attributes
:
(
NSDictionary
*
)
attributes
currentAPI
:
(
NSString
*
)
currentAPI
{
+
(
void
)
track
:
(
NSString
*
)
eventName
attributes
:
(
NSDictionary
*
)
attributes
currentAPI
:
(
NSString
*
)
currentAPI
{
[
self
track
:
eventName
attributes
:
attributes
sendNow
:
[
NewPhobos
sharedClient
].
isGraySendNow
currentAPI
:
currentAPI
];
[
self
track
:
eventName
attributes
:
attributes
sendNow
:
NO
currentAPI
:
currentAPI
];
}
}
+
(
void
)
track
:
(
NSString
*
)
eventName
attributes
:
(
NSDictionary
*
)
attributes
sendNow
:
(
BOOL
)
sendNow
currentAPI
:
(
NSString
*
)
currentAPI
{
+
(
void
)
track
:
(
NSString
*
)
eventName
attributes
:
(
NSDictionary
*
)
attributes
sendNow
:
(
BOOL
)
sendNow
currentAPI
:
(
NSString
*
)
currentAPI
{
NSDictionary
*
dataDict
=
[
_sharedClient
prepareDictionaryForEvent
:
eventName
attributes
:
attributes
];
NSDictionary
*
dataDict
=
[
_sharedClient
prepareDictionaryForEvent
:
eventName
attributes
:
attributes
];
// 之前没有进行实时上报的埋点,采用后端控制是否进行实时上报
sendNow
=
sendNow
?:[
NewPhobos
sharedClient
].
isGraySendNow
;
@try
{
@try
{
NSData
*
JSON
=
[
PhobosUtil
encodeJSON
:
dataDict
];
NSData
*
JSON
=
[
PhobosUtil
encodeJSON
:
dataDict
];
[[
PhobosDataManager
sharedPhobosDataManager
]
insertData
:
dataDict
sendAPI
:
currentAPI
phobosType
:
eventName
immediately
:
sendNow
];
[[
PhobosDataManager
sharedPhobosDataManager
]
insertData
:
dataDict
sendAPI
:
currentAPI
phobosType
:
eventName
immediately
:
sendNow
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment