3 ms·
Why include the lookup table in the client code? If you're just mapping (CPU, resolution) to a model, why not just send that tuple to your analytics framework
by jrockway 8y ago
Why include the lookup table in the client code? If you're just mapping (CPU, resolution) to a model, why not just send that tuple to your analytics framework and look it up when displaying? Doing the lookup on the client code means every client has to download the table, and you have to blow away their cached copy whenever you come up with an improvement in the mapping. Limiting it to iDevices certainly makes this table smaller, but I feel like that's a starting off point only... real websites are going to want data about other platforms.
- mygo 8y ago> Why include the lookup table in the client code? maybe it’s a static site.
- jrockway 8y agoThe example was sending the data to Google Analytics, though.
- mygo 8y agostatic sites can use google analytics. google analytics is a client side include. I’ve set up a few static landing pages, and used google analytics to see how much traffic they’re getting, if any
- krispbyte 8y agoWhich reinforces the need to do the lookup in client code since you can't code it into GA.
- mygo 8y agoI mean you could just get the data from the client that the lookup needs and then send that data to your server for your server to do the lookup and then return the result to the client but maybe it’s a static site
- deleted 8y ago[deleted]