Hi everyone,
I’m trying to track the clicks made on a Landing Page, but I haven’t been able to make it work.
I’ve tried it in two ways:
//Inside CTA
onclick="sendTagClick('clickcontratar_cta'); return true;"//At the bottom, inside body.
<script>
function sendTagClick(tagName) {
try {
if (document.controller && typeof document.controller.submitTag === "function") {
document.controller.submitTag(tagName);
console.log("Tag enviada:", tagName);
}
} catch (e) {
console.error("Error al enviar tracking tag:", e);
}
}
</script>//At the top, inside the HEAD
<script>
var adcV7 = {}
adcV7.sendTracking= function(identifier)
{
// https://mywebsite.campaign.adobe.com/r/?tagid=clickCRSSimulador&rcpid=iRecipientId%3D33644046&jobid=138176
simulador_buton();
document.controller.setValue("/ctx/vars/clickContratar", "true");
var urlEntorno = "https://mywebsite.campaign.adobe.com";// document.controller.getValue("/ctx/vars/urlEntorno").toString();
var idRecipient = document.controller.getValue("/ctx/recipient/@id").toString() ;
var idDeliveryHex = document.controller.getValue("/ctx/vars/idHex").toString() ;
var imgtrack = "<img width='0' height='0' src='" + urlEntorno+ "/r/" + Math.random().toString() + "?tagid=" + identifier + "&rcpid=" + idRecipient + "&jobid=" + idDeliveryHex + "'/>";
$("#bodyId").after(imgtrack);
}
</script>//Tag on CTA
<div class="aligncen" style="padding-top:50px">
<a target="_blank" class="btn botoncabecera color004d40" href="https://website.com/CA-FRONT/NBE/web/particulares/?redirect=21a0bbed-e2da-471d-b8ad-945cb0b36ba1&utm_source=lanzamiento&utm_medium=landingpage" onclick="adcV7.sendTracking('clickContratar'); return true;">
CTA
</a>
</div>Ultimately, what I’m trying to achieve is the ability to track the clicks on my Landing Page and have that data appear in Adobe Campaign.
The query I’m using to retrieve the click data is based on the targeting dimension nms:recipient and the filtering dimension nms:trackingLogRcp.
Thank you in advance.
Diego
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi @DiegoAd,
I do believe that you are really close, the problem I think it's not your code it's the table your are pointing to. Landing pages and WebApps clicks are tracked in nms:webTrackingLogRcp, not in trackingLogRcp.
You need to check that web tracking is enabled and the tracking server that you indicate is reachable. At the end, if the traffic doesn't come form an email you will have to set a source inside the WebApp properties.
I hope it is useful, and if you need more help just let me know.
Best,
Celia
Hi @DiegoAd,
I do believe that you are really close, the problem I think it's not your code it's the table your are pointing to. Landing pages and WebApps clicks are tracked in nms:webTrackingLogRcp, not in trackingLogRcp.
You need to check that web tracking is enabled and the tracking server that you indicate is reachable. At the end, if the traffic doesn't come form an email you will have to set a source inside the WebApp properties.
I hope it is useful, and if you need more help just let me know.
Best,
Celia
Views
Likes
Replies