@@ -36,8 +36,7 @@ func (client *OptimizelyClient) Track(
36
36
event_key string ,
37
37
user_id string ,
38
38
attributes []AttributeEntity ,
39
- event_value string ,
40
- project_config ProjectConfig ) {
39
+ event_value string ) {
41
40
42
41
var Url * url.URL
43
42
Url , err := url .Parse ("http://www.example.com" )
@@ -46,23 +45,23 @@ func (client *OptimizelyClient) Track(
46
45
}
47
46
48
47
end_user_id := fmt .Sprintf (END_USER_ID_TEMPLATE , user_id )
49
- goal_id := GetGoalIdFromProjectConfig (event_key , project_config )
48
+ goal_id := GetGoalIdFromProjectConfig (event_key , client . project_config )
50
49
51
50
// build string to make GET request with
52
51
parameters := url.Values {}
53
- parameters .Add (ACCOUNT_ID , project_config . AccountId )
54
- parameters .Add (PROJECT_ID , project_config .ProjectId )
52
+ parameters .Add (ACCOUNT_ID , client . account_id )
53
+ parameters .Add (PROJECT_ID , client . project_config .ProjectId )
55
54
parameters .Add (GOAL_NAME , event_key )
56
55
parameters .Add (GOAL_ID , goal_id )
57
56
parameters .Add (END_USER_ID , end_user_id )
58
57
59
58
// Set experiment and corresponding variation
60
59
BuildExperimentVariationParams (
61
- project_config , event_key , project_config .Experiments , user_id , parameters )
60
+ client . project_config , event_key , client . project_config .Experiments , user_id , parameters )
62
61
63
62
// Set attribute params if any
64
63
if len (attributes ) > 0 {
65
- BuildAttributeParams (project_config , attributes , parameters )
64
+ BuildAttributeParams (client . project_config , attributes , parameters )
66
65
}
67
66
68
67
// Set event_value if set and also append the revenue goal ID
0 commit comments