Check if user is using StumbleUpon
StumbleUpon is a great way to drive traffic to your website. To get the attention of Stumblers can be though, so the bounce rate is often high on their visits.
To higher the chance of getting them to stay at your website, you can display a special message to them. This conditional tag checks if the user comes from StumbleUpon and let’s you do something if they are.
Note: this doesn’t work if the user are using a browser toolbar, since it checks the URL for stumbleupon.com.
Code Snippet:
<?php if( strpos($_SERVER[HTTP_REFERER], "stumbleupon.com" ) == true ): ?>
<div class="welcome-stumbleupon">
<p>Hello StumbleUpon user!</p>
</div>
<?php endif; ?>
Related snippets
Add Links to WordPress 3.3 New Toolbar
Disable admin bar
Display twitter followers count
Disable Google Analytics in preview-mode
Adjust Vimeo Auto-Embed Size
Remove WordPress Logo From Admin Bar
Edit button on posts & pages
Shortcodes in templates
Show Images from Post or Page Attachments
Add Post Class if Post has thumbnail