Skip to content

Commit 89a2e62

Browse files
committed
Move import_endpoint to Import function.
1 parent 6bc1738 commit 89a2e62

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mixpanel.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ mp.Track("12345", "Welcome Email Sent", &P{
110110
})
111111
*/
112112
func (mp *Mixpanel) Track(distinct_id, event string, prop *P) error {
113-
import_endpoint += "?api_key=" + mp.Token
114113
return mp.sendEvent(distinct_id, event, prop, "events")
115114
}
116115

@@ -119,6 +118,7 @@ Imports events that occurred more than 5 days in the past. Takes the
119118
same arguments as Track and behaves in the same way.
120119
*/
121120
func (mp *Mixpanel) Import(distinct_id, event string, prop *P) error {
121+
import_endpoint += "?api_key=" + mp.Token
122122
return mp.sendEvent(distinct_id, event, prop, "import")
123123
}
124124

0 commit comments

Comments
 (0)