Comments (2)
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
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.
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)
- Change Magneto standard firstname, lastname to first_name, last_name HOT 1
- Omit gender if it's not set HOT 1
- Both Search Track and Page calls should omit query text HOT 1
- backend orders? recurring orders? HOT 2
- Pre-flight Check: PHP Warnings.
- Cleaning Up Traits HOT 2
- Address Traits HOT 1
- Identify on every page HOT 11
- Intro text missing
- Add support for Composer HOT 3
- Customer data dump + exit showstopper HOT 1
- Instantiate action controllers through Mage::getModel to make them rewritable HOT 2
- Category pages report duplicated names
- Product page names should also report title HOT 1
- I can not add items to my cart HOT 5
- "Undefined index: entity_id" error is thrown when customer logs out HOT 2
- Missing argument 2 for Segment_Analytics_Helper_Data::{closure}() thrown on product detail page HOT 3
- Why is everything sent from the client? HOT 1
- This project SUCKS HOT 1
- Observer on order place causes background process not to run
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from analytics-magento.