Home > Tracking Campaigns > Voluum

Voluum, bypass offer URL when going to landing page (4)


08-12-2014 06:07 PM #1 mikesf (Member)
Voluum, bypass offer URL when going to landing page

Here's a support question I just sent to Voluum. Anybody else trying to do the same thing?

When I use Voluum's "Click URL" in my landing page, it seems like I cannot have visitors going directly to the landing page, bypassing the campaign URL. I get this error.

Error 400
Visit data was missing when handling click. To redirect a click, you must go through your campaign URL. Details: URL parameter 'voluumdata' is missing.

However, sometimes I want people to bypass the offer URL. For example, I would like to add social "like" and "share" buttons to my landing page to get free clicks.

Do you have a solution for accomplishing that?


08-13-2014 11:02 AM #2 zeno (Administrator)

Easy.

Use PHP to do a simple if/else to check for a URL string. If the key voluumdata exists then set click URL to your Voluum one, if not, set to some other link.

You can surely do this with JS as well but I don't know how - should be trivial though!


08-13-2014 12:30 PM #3 andyvon (AMC Alumnus)

Since I needed this myself, here is a simple copy/paste solution for you:

Put this code on top of your landing page:

Code:
<?php
	if (isset($_GET["voluumdata"]))
		$offer = "http://asdf.trackvoluum.com/click";
	else
		$offer = "http://yourofferlink.com";
?>
Use this as your offer link:
Code:
<a href="<?= $offer; ?>">Offer Link</a>


08-19-2014 07:22 AM #4 mikesf (Member)

Thanks zeno and andyvon. The support team at Voluum said I would have to create two campaigns -- one to track the clicks to my landing page, the other from my landing page to the offer. I like your solution better.

I prefer to keep my landing page a simple static page with no PHP. Something similar to this would work with JavaScript...

Code:
<!-- Assume we got here via the Voluum URL. -->
<a class="offer" href="http://trackvoluum.example.com/click">

<script>
    // If we didn't get here via the Voluum URL,
    // then change the offer links to bypass Voluum.
    var query = window.location.search.substring(1);
    if (/(^|&)voluumdata=/.test(query) === false) {
        var links = document.getElementsByClassName('offer');
        for (var i = 0; i < links.length; i++)
            links[i].href = 'http://direct.offerurl.com/';
    }
</script>


Home > Tracking Campaigns > Voluum