kuhnza / angular-mixpanel Goto Github PK
View Code? Open in Web Editor NEWMixpanel module for Angular JS
License: MIT License
Mixpanel module for Angular JS
License: MIT License
mixpanel.people.union is not available from this API... should be added
I'm having a weird issue. Some of the profiles (alias) are not sent to MixPanel so the users don't show up there under the People list. They ar successfully added in my database and the sign up process is fine, just not showing up in MP.
Has anyone seen this?
TIA,
Andrew
Could you please submit the module to the NPM registry? It would make lives of a few people a bit easier ;)
`
function init() {
if (!Object.prototype.hasOwnProperty.call(window, 'mixpanel')) {
throw 'Global mixpanel not available. Did you forget to include the library on the page?';
}
mixpanel.init(apiKey);
waitTillAsyncApiLoaded(function () {
if (superProperties) mixpanel.register(superProperties);
});
}
`
In the above function, should it not call mixpanel.init(apiKey) inside the waitTillAsyncApiLoaded callback?
I get weird cases where no events or properties are sent to Mixpanel and I'm wondering if in some cases the init is called before the library is fully loaded...
To be able to clear a user from mixpanel, this seems to be the only option: So exposing mixpanel.cookie would be coool
Is it possible to expose the init function?
Can't invoke mixpanel.reset. https://mixpanel.com/help/reference/javascript-full-api-reference#mixpanel.reset
Per docs @ https://mixpanel.com/help/reference/javascript-full-api-reference#mixpanel.time_event but the function is not exposed in this library.
Hi,
I was trying to understand your below code
function callMixpanelFn(name) {
return function () {
var fn = window.mixpanel,
parts = name.split('.'),
scope, i;
for (i = 0; i < parts.length; i++) {
scope = fn;
fn = fn[parts[i]];
}
return fn.apply(scope, arguments);
}
I am not able to understand from were arguments parameter will get filled? you are not passing any parameters to function call except name.
Is their any chance to update a working demo code with a call to mixpanel api with arguments?
For example how would below function execute if I use your wrapper in my code?
mixpanel.track("signup", {
"age": 28,
"gender": "male",
"source": "facebook"
});
Thanks,
Ashok
The docs say:
angular.module('myApp', ['analytics.mixpanel']);
Minimally you'll need to configure your API key like so:
angular.module('analytics.mixpanel')
.config(['$mixpanelProvider', function($mixpanelProvider) {
$mixpanelProvider.apiKey('<your project token>'); // your token is different than your API key
}]);
However I think the second module should also be 'myApp'
mixpanel doesnot work in Android app built with ionic cordova. The CDN address provided in mixpanel-jslib-snippet.min.js is "//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js". In android, this file is searched in local device.
I made it to work by adding HTTP protocol "http://cdn.mxpnl.com/libs/mixpanel-2-latest.min.js". in jslib-snippet.min.js. The problem is I have to do this in each device.
Is there a way to do this in proper way??
Hi, I would like to use your library in my project, although it would be good to have it on a public cdn.
I'm trying to add it to cdnjs, your support would be appreciated:
cdnjs/cdnjs#4198
Using "angular-mixpanel.min.js" version the following code gives me an "Undefined is not a function" exception:
this.$mixpanel.track(eventName, params, callback)
When using the "angular-mixpanel.js" file, there's no problem.
I think the minified version has some problem, the code is completely different.
Hi,
I tried registering an event using utm_source but was unable to. Am also not able to figure out how it can be achieved using this library. Kindly help me out.
Hi,
I have configured the mixpanel in my angular js app but when I load the page I'm getting the error as Global mixpanel not available. Did you forget to include the library on the page?
.
I included the angular-mixpanel
in my assets application.js
file and did the configuration in my main app.coffee.erb file.
Can someone help me in resolving this issue?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.