Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
Abigail Wentzel4,136 Points
Need to build a dynamic navigation bar, with specific links based on the user.
I need the navigation to show one set of links for existing customers, and another set for visitors. I realize I can code this with PHP using permissions, but that's only helpful if the user logs in to their profile. Plus, if their session times out then they're back to the visitor navigation.
Instead, I'd like the navigation to stay consistent 100% of the time as soon as they land on the site. Is there a way to set up tracking to achieve this? And then how would I code the "view on/off" for the navigation?
Unless someone has a very compelling argument I can take to my boss(es) to talk them out of dumping every single link for existing customers in the primary navigation bar? Especially when the primary purpose of the website is lead generation (and these links are NOT relevant to incoming leads). And most especially when they only generated a 1.17% click-through rate? /rant
David Clausen11,403 Points
You can do this by cookies, IP tracking and log-in session. They are all valid. Using a combination of all three is your best bet. But remember you are exposing your client more when you only require one. Say someone else uses that IP, or they reget cookies. Forcing a customer to have his information logged somewhere where they can't actively block or prevent it is considered somewhat malicious and a privacy concern.
There is a reasonable expectation when someone closes their browser there logged of their website. A remember me check mark then can record the cookie and ip to allow for auto-login when visiting your site.
Cookie is important because if someone logs into the computer under another account then the IP is checked but the cookie isnt, requiring a log in for the new user.
Abigail Wentzel4,136 Points
Well, I'm trying to find a workaround / compromise with these links. We just launched updated navigation 2 weeks ago. The links in question are now one level down, in a submenu rather than the primary nav bar. Suddenly my boss is getting "numerous" calls from "disgruntled" people saying they can't find a particular page anymore. Of course, he can't give me an exact number or tell me who the users are.
I'm not saying I'm fine with unhappy or confused users. The point of the navigation update in the first place was to make it cleaner, clearer and more mobile-user friendly. It went from 10+ unrelated and unprioritized links to 4, now reorganized into appropriate categories.
It's just that the reporting and analysis shows that these are outliers, not the norm. I'm trying to convince them that the nav update is too new to start making major changes to it. I want to continue to monitor the behavior and see if it differs from the prior navigation (more clicks, less clicks, more conversions, etc)
Plus, do we really want to reverse the update simply to satisfy a very small minority of users (maybe 0.5%)?