To connect your landing page with BeMob it is required to add dedicated Click URLs. The domain used in Click URL should match the main tracking domain used for a particular campaign in BeMob.
If you want to use the same landing page in multiple campaigns with different tracking domains, you can pass domain name to your click URL dynamically. It allows you to have the correct click URL on your landing page even if the tracking domain is different in each campaign.
This guide describes how to do that correctly.
To start, you need to have your landing page added to your BeMob account.
🔎 Learn more about this option in our Workspaces guide.
🔎 More details on landing page settings see in our dedicated guide.
If your landing page has already been created, press Edit button to edit it.
In our example we use GET parameter domain.
https://www.mylandingpage.com?domain={trackingDomain}
It is not obligatory to use domain as the GET parameter. You can use your own parameter in this case.
In this step you need to modify the landing page code to pass the domain name to your click URL or multi-offer click URL dynamically.
For this you may need to download the page from the hosting service, then open it via any code editor such as Notepad, Sublime Text, Atom.
<script>
function getURLParameter(name) {
return decodeURI(
(RegExp(name + '=' + '(.+?)(&|$)').exec(location.search)||[,null])[1] || ''
);
}
</script>
<script>
document.write('<a class="btn btn-lg btn-success" href="https://' + getURLParameter('domain') + '/click" role="button">Click Here</a>')
</script>
In this script getURLParameter('domain') gets a value that was passed in a {trackingDomain} token, so the actual click URL will look like https://yourdomain.com/click
You should use the same GET parameter in your landing page URL and the code of your landing page.
If you have a landing page with several call-to-action buttons which lead to several offers, you should modify each multi-offer click URL with the GET parameter.
<script>
document.write('<a class="btn btn-lg btn-success" href="https://' + getURLParameter('domain') + '/click/1" role="button">Click Here</a>')
</script>
<script>
document.write('<a class="btn btn-lg btn-success" href="https://' + getURLParameter('domain') + '/click/2" role="button">Click Here</a>')
</script>
<script>
document.write('<a class="btn btn-lg btn-success" href="https://' + getURLParameter('domain') + '/click/3" role="button">Click Here</a>')
</script>
To check if the domain name is passed in your click URL correctly, you should go through Campaign URL.
If you have any questions or need the assistance with the settings, contact our support team through the live chat or at support@bemob.com