Giter VIP home page Giter VIP logo

Comments (2)

astorm avatar astorm commented on May 29, 2024

Got is — the isAdmin check was checking admin page/context only — read on for why and a discussion of the problem.

Re: not tracking admin users when they're browsing — I definitely see the need for this but Magento's authentication model separates admin users and frontend cart users (the framework has a concept called "areas" which allow you to define different contexts — a frontend context, an admin context, etc) There's two separate sessions setup for each area/context. One named adminhtml, the other named frontend

screen shot 2014-07-14 at 1 16 31 pm

This means there's no easy way to know if a user is a logged in admin-user when they're browsing the store. We have two options here, each with a tradeoff. Let me know which one you think fits Segment's goals best.

First — I've previously done some experiments that allows Magento to temporarily switch session contexts, read some data from the alternate session, and then switch contexts back so everything works normally. I'd love the chance to try this code out in a real project but sessions are the sort of fiddly things that may require later bug fixes. I wouldn't be sure we could launch on day 1 without problems.

Second — lacking a way to read the admin context from a front-end context, the first solution that comes to mind is allowing system owners to blacklist certain IP addresses from their statistics. While not as elegant as automatically handling things, it would solve the problem, and also give those users a feeling of control. I'd see this as a simple text area where users could enter the IP addresses.

Let me know which direction you'd like to go, or if there's a third option you'd like to try.

from analytics-magento.

ianstormtaylor avatar ianstormtaylor commented on May 29, 2024

Gotcha, that makes perfect sense, thanks for the explanation. I think in that case let's just drop it completely. At some point we should probably have this kind of feature as a native Segment UI feature (either an IP blacklist list, or even just setting a cookie to blacklist people who visited the Segment UI since they'd be the admins). But that way we don't have to make it a Magento-specific concern.

from analytics-magento.

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.