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&#91;HTTP_REFERER&#93;, "stumbleupon.com" ) == true ): ?>
    &lt;div class="welcome-stumbleupon">
        &lt;p>Hello StumbleUpon user!&lt;/p>
    &lt;/div>
<?php endif; ?>

Posted in Social