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.
<?php if( strpos($_SERVER[HTTP_REFERER], "stumbleupon.com" ) == true ): ?> <div class="welcome-stumbleupon"> <p>Hello StumbleUpon user!</p> </div> <?php endif; ?>