Clicks on specific elements (like buttons, links, banners, or downloads) can be considered as conversions when they indicate meaningful user engagement. For example: newsletter sign-up button clicks, 'Add to Cart' / 'Contact Us' clicks, download button clicks etc.
Similarly, the act of a user arriving on and viewing an offer page is a significant action that can be tracked as a conversion. For example: viewing a pricing page, visiting a specific offer or product page etc.
Tracking clicks / page views as micro-conversions helps understand which steps users take before a macro-conversion (like a purchase).
With BeMob, you can track website actions as conversions from both landing pages and offers.
To track landing page clicks as conversions with BeMob, you should perform the following steps:
1. Locate the section of your page to insert the script.
Find the appropriate place in your HTML file where this script should be added. Typically, this would be within the <body> tag where you want the button or event to appear.
2. Customize the script:
<script>
const trackingDomain = "www.yourdomain.com"
function getURLParameter(name) {
return decodeURIComponent(
(RegExp(name + '=' + '(.+?)(&|$)').exec(location.search) || [, null])[1] || '',
);
}
async function sendConversion(customEventType) {
const url = `https://www.yourdomain.com/conversion.txt?cid=${getURLParameter('cid')} || 'OPTIONAL'}`;
const response = await fetch(url);
if (!response.ok) {
throw new Error(`Response status: ${response.status}`);
}
console.log(`:sunglasses: BeMob Conversion Sent`);
}
document.addEventListener('click', function(event) {
// Find the nearest <a> tag ancestor of the clicked element (including the element itself)
const anchor = event.target.closest('a');
// Check if the anchor tag exists and has an href
if (anchor && anchor.getAttribute('href')) {
const href = anchor.getAttribute('href');
// Check if the href starts with the desired prefix
if (href.startsWith(`https://www.yourdomain.com/click`)) {
console.log('User clicked URL:', href);
sendConversion().catch(console.error);
// The link will follow its default behavior, no need to prevent it
}
}
}, false);
</script>
www.yourdomain.com should be replaced with the actual domain of your BeMob account.
Ensure the domain in your tracking script matches the one selected in your campaign settings.
3. Insert the script into your landing page.
Once customized, copy the entire script and paste it into your page where you want the event to be triggered.
4. Set Click URL / Multi-Offer Click URL on the CTA button(s) of your landing page.


BeMob Click URL example:
<a href=“https://xxxxx.bemobtrcks.com/click” class=“btn-success”>Click me!</a>
BeMob Multi-Offer Click URL example:
<a href=“https://xxxxx.bemobtrcks.com/click/1” class=“btn btn-success”>Click me 1!</a>
<a href=“https://xxxxx.bemobtrcks.com/click/2” class=“btn btn-success”>Click me 2!</a>
You can specify any text you like instead of Click me!
👉 See the complete guide about Click URL / Multi-Offer Click URL settings here.
5. Customize your landing page URL.
Access your landing page settings in BeMob and append cid={clickId} to the end of the landing page URL.

To track offer page clicks as conversions with BeMob, you should perform the following steps:
1. Locate the section of your page to insert the script.
Find the appropriate place in your HTML file where this script should be added. Typically, this would be within the <body> tag where you want the button or event to appear.
2. Customize the script:
<script>
<button onclick="sendEvent('click')" class="btn-success">Click me!</button>
<script>
function getURLParameter(name) {
return decodeURIComponent(
(new RegExp(name + '=' + '(.+?)(&|$)').exec(location.search) || [, null])[1] || ''
);
}
function sendEvent(event) {
// Create tracking pixel
var img = document.createElement('img');
img.src = `https://www.yourdomain.com/conversion.gif?cid=${getURLParameter('cid')}`;
img.style.display = 'none';
document.body.appendChild(img);
// Log to console
console.log(`:sunglasses: BeMob Event - ${event}`);
// Redirect after short delay to ensure tracking fires
setTimeout(function() {
window.location.href = "https://www.google.com";
}, 150);
}
</script>
You can specify any text you like instead of Click me!
www.yourdomain.com should be replaced with the actual domain of your BeMob account.
Ensure the domain in your tracking script matches the one selected in your campaign settings.
Additionally, replace the URL where your users will be redirected after the click on the button.
For example, if you want your users to be redirected to https://www.google.com, then put it like this:
// Redirect
window.location.href = "https://www.google.com"
3. Insert the script into your offer page.
Once customized, copy the entire script and paste it into your page where you want the event to be triggered.
4. Customize your offer page URL.
Access your offer page settings in BeMob and append cid={clickId} to the end of the offer page URL.

To track offer page clicks as custom conversions with BeMob, you should perform the following steps:
1. Create a custom conversion event in BeMob.


click
👉 The full guide on custom conversion tracking is available here
2. Locate the section of your page to insert the script.
Find the appropriate place in your HTML file where this script should be added. Typically, this would be within the <body> tag where you want the button or event to appear.
3. Customize the script:
<script>
<button onclick="sendEvent('click')" class="btn-success">Click me!</button>
<script>
function getURLParameter(name) {
return decodeURIComponent(
(new RegExp(name + '=' + '(.+?)(&|$)').exec(location.search) || [, null])[1] || ''
);
}
function sendEvent(event) {
// Create tracking pixel
var img = document.createElement('img');
img.src = `https://www.yourdomain.com/conversion.gif?cet=${event}&cid=${getURLParameter('cid')}`;
img.style.display = 'none';
document.body.appendChild(img);
// Log to console
console.log(`:sunglasses: BeMob Event - ${event}`);
// Redirect after short delay to ensure tracking fires
setTimeout(function() {
window.location.href = "https://www.google.com";
}, 150);
}
</script>
You can specify any text you like instead of Click me!
www.yourdomain.com should be replaced with the actual domain of your BeMob account.
Ensure the domain in your tracking script matches the one selected in your campaign settings.
Additionally, replace the URL where your users will be redirected after the click on the button.
For example, if you want your users to be redirected to https://www.google.com, then put it like this:
// Redirect
window.location.href = "https://www.google.com"
4. Insert the script into your offer page.
Once customized, copy the entire script and paste it into your page where you want the event to be triggered.
5. Customize your offer page URL.
Access your offer page settings in BeMob and append cid={clickId} to the end of the offer page URL.

To track offer page views as conversions with BeMob, you should perform the following steps:
1. Locate the section of your page to insert the script.
Find the appropriate place in your HTML file where this script should be added. Typically, this would be within the <body> tag where you want the button or event to appear.
2. Customize the script:
<script>
function getURLParameter(name) {
return decodeURIComponent(
(new RegExp(name + '=' + '(.+?)(&|$)').exec(location.search) || [, null])[1] || ''
);
}
document.addEventListener('DOMContentLoaded', function() {
var img = document.createElement('img');
img.src = `https://www.yourdomain.com/conversion.gif?cid=${getURLParameter('cid')}`;
img.style.display = 'none';
document.body.appendChild(img);
});
</script>
www.yourdomain.com should be replaced with the actual domain of your BeMob account.
Ensure the domain in your tracking script matches the one selected in your campaign settings.
3. Insert the script into your offer page.
Once customized, copy the entire script and paste it into your page where you want the event to be triggered.
4. Customize your offer page URL.
Access your offer page settings in BeMob and append cid={clickId} to the end of the offer page URL.

To track offer page views as custom conversions with BeMob, you should perform the following steps:
1. Create a custom conversion event in BeMob.


load
👉 The full guide on custom conversion tracking is available here
2. Locate the section of your page to insert the script.
Find the appropriate place in your HTML file where this script should be added. Typically, this would be within the <body> tag where you want the button or event to appear.
3. Customize the script:
<script>
function getURLParameter(name) {
return decodeURIComponent(
(new RegExp(name + '=' + '(.+?)(&|$)').exec(location.search) || [, null])[1] || ''
);
}
document.addEventListener('DOMContentLoaded', function() {
var img = document.createElement('img');
img.src = `https://www.yourdomain.com/conversion.gif?cet=load&cid=${getURLParameter('cid')}`;
img.style.display = 'none';
document.body.appendChild(img);
});
</script>
www.yourdomain.com should be replaced with the actual domain of your BeMob account.
Ensure the domain in your tracking script matches the one selected in your campaign settings.
4. Insert the script into your offer page.
Once customized, copy the entire script and paste it into your page where you want the event to be triggered.
5. Customize your offer page URL.
Access your offer page settings in BeMob and append cid={clickId} to the end of the offer page URL.

📩 Need help? Contact support via live chat or email at support@bemob.com