Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import functionality is broken #106

Open
antulik opened this issue Feb 3, 2018 · 10 comments
Open

Import functionality is broken #106

antulik opened this issue Feb 3, 2018 · 10 comments

Comments

@antulik
Copy link

antulik commented Feb 3, 2018

In short: import method succeeds but no data is stored.

Longer version

tracker.import('SECRET", '123', "Event", {"time" => 1517048470 })

This returns success result, but the event is not created in mixpanel.

Curl also does not work if api_key is passed as a param. For example

curl https://api.mixpanel.com/import \
-d data=abc \
-d verbose=1 \
-d api_key=123

The documentation uses curl example with basic authentication and it works like that: https://mixpanel.com/help/reference/importing-old-events

curl https://api.mixpanel.com/import \
-u YOUR_API_SECRET: \
-d data=eyJldmVudCI6ICIkc2lnbnVwIiwgInByb3BlcnRpZXMiOiB7ImRpc3RpbmN0X2lkIjogIjQ4MSIsICJ0aW1lIjogMTMyMTQ5OTM3MSwgInRva2VuIjogIjEzZmUzZGRjODZlYjZmOTBjNGVlN2QwZDQ3NTYzMTUwIn19 \
-d verbose=1

So my assumption that api_key param is ignored and basic authentication should be used instead

@sugampandey
Copy link

It does not work for us either.

@jshow
Copy link

jshow commented Dec 11, 2018

thanks for the diagnosis @antulik

@DataGreed
Copy link

DataGreed commented Aug 12, 2019

So, did mixpanel just dropped the support for it?

@tony-schumacher
Copy link

Does anybody got an update on this?
If this is not fixed I will definitely chose a different product.

@reinaris
Copy link

@TonySchu I found a fix in the network graph LifeTales@e9f425d

Didn't tested it yet, but maybe it can help you.

@reinaris
Copy link

@TonySchu I found a fix in the network graph LifeTales@e9f425d

Didn't tested it yet, but maybe it can help you.

🤦 just saw @jshow already opened a PR for this #109. 2 years ago 😑

@ts-mms
Copy link

ts-mms commented Jan 13, 2021

Thank you @reinaris.
I am actually using the node implementation and it is a real bummer that this option is not working.

@lloydwatkin
Copy link

I've been running imports all morning and not seeing data, thought was me. This is pretty poor Mixpanel team!

@enague
Copy link

enague commented Feb 1, 2022

Hi everyone!

Eric from Mixpanel Support here, and I'm sorry about the confusion.

I tested this out on my own, and I'd like to suggest a quick troubleshooting method. Essentially, in the Mixpanel Ruby library, both the track method and profile update method are using the project token to authenticate, and as far as I know, the import method is the only method using both token and API key to authenticate.

Note: you can see when to use /track or /import here: https://developer.mixpanel.com/reference/track-event#when-to-use-track-vs-import

Therefore, I would double check that you are using the API Key (NOT THE API SECRET) in your requests. This can be found in your personal settings as described here: https://help.mixpanel.com/hc/en-us/articles/360000953003#accessing-personal-settings

I hope that helps, and sorry again for the inconvenience or confusion here.

@gregawoods
Copy link

I ran into this issue today. As far as I can tell, it seems like the implementation of import in this gem doesn't work. Wouldn't mind being proven wrong, though!

For now I am writing the request myself using Net::HTTP. I got it working fairly quickly that way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants