Giter Site home page Giter Site logo

Comments (3)

hschoenburg avatar hschoenburg commented on July 3, 2024

Hey, just a bit more detail about this issue.

Keen.io likes nested event properties like so

   "title": "Music is Peace T-shirt size L",
    "updated_at": "2013-10-01T18:15:37.758Z",
    "user": {
        "acted_auctions_count": null,
        "auction_count": 63,
        "bid_count": 32,
        "created_at": "2013-08-14T18:28:29.054Z",

But Mixpanel cannot handle nested properties and simply drops them.

SO

To handle this, you end up having to call Analytics.track twice, with different options hashes. In order for this to work you need to DEEP COPY the options hash. Cloning does not cover nested attributes, so it won't help here.

If Segment could help facilitate discussion among analytics providers regarding issues like this, that would be great. Right now, if you are using Keen and Mixpanel, this issue render segment fairly unnecessary, as you end up with two calls.

thanks for the help.

from analytics-ruby.

ivolo avatar ivolo commented on July 3, 2024

@hschoenburg thanks for the feedback, we should be helping with this case! I think this manifests into two actions:

  1. fix cloning in Ruby
  2. flatten Mixpanel nested attributes https://github.com/segmentio/integrations/issues/8

from analytics-ruby.

ivolo avatar ivolo commented on July 3, 2024

another case of cloning causing customer issues.

def test
  email = "[email protected]"
  user_id = "123213213"

  context = {
                :providers => {:All => false, :Salesforce => true},
                :salesforce => {
                  :object => "Lead",
                  :lookup => {:email => email}
                }
            }
  AnalyticsRuby.identify(:user_id => user_id, :traits => {:firstName => "ALead", :email => email}, :context => context)

  context = {
                :providers => {:Salesforce => true},
                :salesforce => {
                  :object => "Contact",
                  :operation => "update",
                  :lookup => {:email => email}
                }
            }
  AnalyticsRuby.identify(:user_id => user_id, :traits => {:firstName => "AContact", :email => email}, :context => context)
end

from analytics-ruby.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.