Menu

Monitoring extra monetization scripts such as those for the back button and timed redirect.

AffLift More guides Visit site

 

If you’re using landing pages in your campaigns (if you're still not a believer then maybe you should read this), you can have additional opportunities to squeeze extra revenue out of your campaigns.

For example, if someone isn’t interested in your offer/landing page, they might click the back button and go back to where they came from. Why not attempt to monetize this user by using a back button hi-jacking script? You can send them to another offer/lander and have a second chance at getting them to convert on something else they could be interested in.

 

There was a discussion the other day here on the forum about how to handle the redirect links you use in scripts such as the back button script. Should you just use a multi-offer click URL, or, should you use a new campaign URL?

 

Either method would be acceptable and track correctly, but my personal preference is to use a new campaign URL.

 

If you use the multi-offer click URLs then your landing page CTR is going to be affected by both the back button clicks and the clicks on the main CTA button. It’s quite likely that your CTR will be 100%+, which is obviously going to make it hard to tell how effective your landing page really is.

 

Unless I’m using Binom for tracking, my approach is always to use a new campaign URL for the back button script. I just have a single URL for ALL back button clicks and use it in all my landing pages.

 

Let’s go over the set up so you can still track where the revenue this “Back Button Campaign” is coming from:

 

Step 1: Make a Landing Page

I made the following “Awesome Landing Page”. I hope you like it.

Tracking Additional Monetization Scripts (Back Button, Timed Redirect, etc.)

 

Step 2: Install a Standard Back Button Script

I put this script right before the closing tag in the HTML code (you can find many more common affiliate scripts here).

 

JavaScript:

// BACK BUTTON START

var back_url = `https://dattracker.xyz/in/qfZIHrlic1ql7dSngqgY?camp_id=${camp_id}&lp_name=${lp_name}`;

console.log(`The back button URL is now: ${back_url}`);

!(function() {

    var t;

    try {

        const URL = window.location.href.split(/[#]/)[0];

        for (t = 0; 10 > t; ++t) history.pushState({}, "", URL + "#");

        onpopstate = function(event) {

            event.state && location.replace(back_url);

        };

    } catch (o) {

        console.log(o);

    }

})();

// BACK BUTTON END

 

Line 2 has a console.log(), which can be deleted. It's there to assist with debugging. The back_url variable will need to be updated later on in this guide (step 6).

 

Step 3: Add JS Function to Get URL Parameters

This is also a pretty standard affiliate script. It just simply gets URL parameters from the landing page URL.

 

JavaScript:

function getURLParameter(name) {

    return decodeURIComponent(

        (RegExp(name + "=" + "(.+?)(&|$)").exec(location.search) || [,

            null

        ])[1] || ""

    );

}

This script must be placed before your back button script!

 

Step 4: Add Variables for Tokens

Add some variables after the getURLParameter() function and before the back button script for the tokens you’d like to track. In my case, I’m going to track both the campaign ID (from Kintura) and the landing page name (as it’s named in Kintura).

 

JavaScript:

var camp_id = getURLParameter("campaign_id");

var lp_name = getURLParameter("landing_page_title");

console.log(

    `The campaign ID is: ${

          camp_id || null

        } and the landing page is called ${lp_name || null}.`

);

 

You can track any tokens/url parameters you want; Consult your tracker’s documentation for available tokens…

 

The full Javascript code before the closing tag on your landing page should now look something like this:

 

JavaScript:

// GET URL PARAMS START

function getURLParameter(name) {

    return decodeURIComponent(

        (RegExp(name + "=" + "(.+?)(&|$)").exec(location.search) || [,

            null

        ])[1] || ""

    );

}

var camp_id = getURLParameter("campaign_id");

var lp_name = getURLParameter("landing_page_title");

console.log(

    `The campaign ID is: ${

          camp_id || null

        } and the landing page is called ${lp_name || null}.`

);

// GET URL PARAMS END

// BACK BUTTON START

var back_url = `https://dattracker.xyz/in/qfZIHrlic1ql7dSngqgY?camp_id=${camp_id}&lp_name=${lp_name}`;

console.log(`The back button URL is now: ${back_url}`);

!(function() {

    var t;

    try {

        const URL = window.location.href.split(/[#]/)[0];

        for (t = 0; 10 > t; ++t) history.pushState({}, "", URL + "#");

        onpopstate = function(event) {

            event.state && location.replace(back_url);

        };

    } catch (o) {

        console.log(o);

    }

})();

// BACK BUTTON END

 

Step 5: Add “Back Button” Traffic Source

In your tracker, you’re going to need to make a new traffic source. I’m just going to call it “Back Button”, as that’s where the traffic is coming from.

Tracking Additional Monetization Scripts (Back Button, Timed Redirect, etc.)

 

Add any tokens you’d like to see in your reporting for your back button campaign. In my case, there is just going to be {camp_id} and {lp_name}.

 

Note: You can make up whatever you want for the Label, Param, and Token because it’s your traffic source.

 

Step 6: Create a “Back Button Campaign” in Your Tracker

Make yourself a “Back Button Campaign” in your tracker. This campaign URL will be the link that you will be using in your back button script.

Tracking Additional Monetization Scripts (Back Button, Timed Redirect, etc.)

 

Get the campaign URL and add it to your landing page code.

Tracking Additional Monetization Scripts (Back Button, Timed Redirect, etc.)

 

Step 7: Add Landing Page (w/back button script) to Tracker

The tokens you want to show up in your Back Button’s campaign reports must be appended to the landing page URLs you have the back button script on.

Tracking Additional Monetization Scripts (Back Button, Timed Redirect, etc.)

 

If I go through a campaign URL and arrive on this landing page these tokens will resolve into actual values.

 

Step 8: Make a Normal Campaign and Launch

Make a campaign like you normally would. A very basic example:

Traffic Source > LP > Offer

Boom.

Done.

 

Now, when someone clicks on your landing page CTA button in this campaign they will go to the offer… as normal. But, if they click on the back button they will get sent to your “Back Button Campaign” and not count toward your landing page CTR.

 

The concept is the exact same no matter what type of script you're using (timed redirect, popunder, etc.).

AffLift More guides Visit site