How to use the analytics-node.prototype function in analytics-node

To help you get started, we’ve selected a few analytics-node examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cockroachdb / cockroach-gen / pkg / ui / src / redux / customAnalytics / customAnalyticsSagas.spec.ts View on Github external
it("calls analytics#identify with user email in args ", () => {
      const analyticsIdentifyFn = sandbox.stub(Analytics.prototype, "identify");
      const clusterId = "cluster-1";
      const email = "foo@bar.com";
      const action = signUpForEmailSubscription(clusterId, email);

      return expectSaga(signUpEmailSubscription, action)
        .dispatch(action)
        .run()
        .then(() => {
          const expectedAnalyticsMessage = {
            userId: clusterId,
            traits: {
              email,
            },
          };
          analyticsIdentifyFn.calledOnceWith(expectedAnalyticsMessage);
        });

analytics-node

The hassle-free way to integrate analytics into any Node.js application

MIT
Latest version published 2 years ago

Package Health Score

50 / 100
Full package analysis

Popular analytics-node functions