Aimy Steadman Online Marketing |
Aimy Steadman: Internet marketing professional doing great work in Austin, TX. |
fashion-clothes asked: Hi Aimy, I was reading your post, Mobile Browser Detection and Cookie Setting. I think I have everything setup as you mention in the article except for the .js file mentioned here: jquery-cookie-plugin.js. I found the script at github but it looks like there may be some info I need to edit. Can you send me an example of how you setup the file? Thank you.
I think I just used this exact plugin: http://archive.plugins.jquery.com/project/Cookie
By Search Engine Land.
from Smashing Magazine
My friend and fellow Internet marketer, Amber showed me this site last night. She said she’s actually had good results with it, using it for sending social media traffic to her client’s social media properties.
We provide online local marketing, reputation management, loyalty programs, and social media marketing.
When trying to creating my organization’s mobile website, I tried desperately hard to avoid the following user experience:
Standards for mobile website user experience are far from established. Everyone has a different idea for how they want users to experience their content on their phone web browsers. Some people want the style sheet for their entire websites to change for mobile users, and some have completely separate mobile websites with pared-down navigation.
At the Food Bank we chose to have a simpler website for our mobile users with quick-and-easy access to some of our most visited content.
However, since there’s nothing more frustrating than being denied content simply because you’re on your phone, I wanted to make sure users had the option to choose to browse the full site in case they were not able to access information they wanted to.
I also wanted to do almost all of this in CSS or JQuery to make it simple to implement across our gigantic website. I created some original cookie-setting code using the JQuery cookie plugin and used screen-resolution as my primary mobile browser detection tool. Here’s the code. Hope this helps you out!
Include JQuery and the JQuery plugins:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" src="http://www.yourwebsite.com/jquery-cookie-plugin.js"></script>
Check for mobile-level screen resolutions:
<script type="text/javascript">
if(screen.width < 600){
Look for an existing cookie. If there is none, ask the user if they want to view the mobile website or not using the “confirm” function. If they click “OK,” it sets the cookie value as “1” (mobile preference) and forwards them to the mobile website. If they click “Cancel” it sets cookie preference as “2” (full-site preference). The cookie is set to expire in ten days.
if( $.cookie('view') == null )
{
function confirmation()
{
var answer = confirm("View our mobile website?")
if (answer){
var now=new Date();
var expiresDate=new Date();
expiresDate.setDate(now.getDate() + 10);
$.cookie("view", 1, { expires : expiresDate});
window.location = "http://www.yourwebsite.com/mobile/";
}
else{
$.cookie("view", 2, { expires : expiresDate });
}
}
confirmation();
}
If they already have the cookie set as value 1 when they first visit a webpage, it forwards to our mobile website.
if( $.cookie('view') == 1 )
{
window.location = "http://www.yourwebsite.com/mobile/";
}
}
</script>
All together now:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" src="http://www.yourwebsite.com/jquery-cookie-plugin.js"></script>
<script type="text/javascript">
if(screen.width < 600){
if( $.cookie('view') == null )
{
function confirmation()
{
var answer = confirm("View our mobile website?")
if (answer){
var now=new Date();
var expiresDate=new Date();
expiresDate.setDate(now.getDate() + 10);
$.cookie("view", 1, { expires : expiresDate});
window.location = "http://www.yourwebsite.com/mobile/";
}
else{
$.cookie("view", 2, { expires : expiresDate });
}
}
confirmation();
}
if( $.cookie('view') == 1 )
{
window.location = "http://www.yourwebsite.com/mobile/";
}
}
</script>
On our actual mobile website, we also have a “Full site” link at the bottom that simply erases the cookie.
function boom()
{
deleteCookie('view');
}
<a href="http://www.yourwebsite.com/" onClick="boom()">Full Site</a>
Special thanks to Brandon Wiley for helping me with this.
Pictures from my friend Joey’s convergent media program at the University of Incarnate Word. Both my husband and I gave talks at their new media talk series this semester.
Lisa Goddard and Aimy Wiley presenting “Social Media for Volunteer Management” at DOVIA lunch-and-learn on 2/16/11.
Second presentation this week! I’m exhausted.
I gave a talk on 2011 online marketing tools for the Convergent Media program at the University of Incarnate Word in San Antonio last night. Here are some pictures of the event. The talk was recorded so there may be some video content in the works.
Convio just released a list of the top ten online fundraising Food Banks. CAFB is #8! Austin is only the 15th largest city in the US, so I’m really proud to we are in the top ten.
Lisa Goddard and I gave a presentation last week for the Greenlights nonprofit network about setting up and tracking goals for websites using Google Analytics. Thanks for having us, Greenlights!
My department worked on this project this month. It’s an interactive infographic that lets you see the cost of living for different sized families and what the poverty guideline for the same group is. It clearly shows that families between those boundaries are “Stuck in the Middle.”
I posted a link to this article discussing the Food Bank’s new Donate Food Online application last week, but you need a Chronicle of Philanthropy subscription to read the full article. Here’s a scan of the article from the print publication.
I’m teaching this class with Lisa Goddard. Come over and ask me your weird questions! We’ll discuss how to filter out your mom and stalker ex-boyfriend from your general site traffic, how to set up meaningful goals and track them over time.