|
|
|
@ -21,12 +21,12 @@ def transaction_to_mixpanel(user_id, amount, time, product_type): |
|
|
|
@app.task |
|
|
|
@app.task |
|
|
|
def product_payment_to_mixpanel(user_id, event_name, time, properties): |
|
|
|
def product_payment_to_mixpanel(user_id, event_name, time, properties): |
|
|
|
mix = Mixpanel(settings.MIX_TOKEN) |
|
|
|
mix = Mixpanel(settings.MIX_TOKEN) |
|
|
|
properties = { |
|
|
|
props = { |
|
|
|
'$time': time, |
|
|
|
'$time': time, |
|
|
|
} |
|
|
|
} |
|
|
|
properties.update(properties) |
|
|
|
props.update(properties) |
|
|
|
mix.track( |
|
|
|
mix.track( |
|
|
|
user_id, |
|
|
|
user_id, |
|
|
|
event_name, |
|
|
|
event_name, |
|
|
|
properties=properties, |
|
|
|
properties=props, |
|
|
|
) |
|
|
|
) |
|
|
|
|