File tree Expand file tree Collapse file tree 3 files changed +1
-14
lines changed
Expand file tree Collapse file tree 3 files changed +1
-14
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,6 @@ func (c *MeasurementClient) Send(event *event.OpenebsEvent) error {
2929 dataPayload , err := payload .NewPayload (
3030 payload .WithClientId (client .clientId ),
3131 payload .WithOpenebsEvent (event ),
32- payload .WithUserId (client .clientId ),
3332 )
3433
3534 if err != nil {
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ func main() {
99 client , err := gaClient .NewMeasurementClient (
1010 gaClient .WithApiSecret ("NguBiGh6QeOdeG3zJswggQ" ),
1111 gaClient .WithMeasurementId ("G-TZGP46618W" ),
12- gaClient .WithClientId ("uniqueClientId -000000001" ),
12+ gaClient .WithClientId ("uniqueUserId -000000001" ),
1313 )
1414 if err != nil {
1515 panic (err )
Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ type PayloadOption func(*Payload) error
1111type Payload struct {
1212 ClientId string `json:"client_id"`
1313 Events []ApiEvent `json:"events"`
14- UserId string `json:"user_id"`
1514}
1615
1716type ApiEvent struct {
@@ -44,17 +43,6 @@ func WithClientId(clientId string) PayloadOption {
4443 }
4544}
4645
47- func WithUserId (userId string ) PayloadOption {
48- return func (p * Payload ) error {
49- if len (userId ) == 0 {
50- return errors .Errorf ("failed to set Payload userId: id is an empty string" )
51- }
52-
53- p .UserId = userId
54- return nil
55- }
56- }
57-
5846func WithOpenebsEvent (event * event.OpenebsEvent ) PayloadOption {
5947 return func (p * Payload ) error {
6048 p .Events = append (p .Events , ApiEvent {
You can’t perform that action at this time.
0 commit comments