Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Banner View and Click tracking in Mobile App

Level 1
Level 1

Hi There! we have an Activity running on Mobile App where we have the below code to track Banner views and Clicks. Unfortunately this isn't working. Would you where we are going wrong?

Offer Code

function displayoffer(mainText,redirectID,btnText,deepKey) {

var headText = mainText;

var btn = btnText;

$('#myaccounts-bottom-slider').prepend('<div id="App_Demo1" class="POCDemo1_offer_innerDisplayDiv ${}" style="display: inline-block;"><p class="POCDemo1_offer_Bold">'+

headText+'</p><div id="button" class="POCDemo1_offer-button">'+'<a id="Demo1CTA" type="button">'+btn+'</a></div></div>');

var action = "account overview DemoPOC2 Rec B bannerView";

cData.put("cd.pageName","App:POC2:BannerView");          //Got this Syntax from offshore SC team

trackAction(action, cData);

var learnMore = document.getElementById("Demo1CTA");

    learnMore.addEventListener("click", function() {

var action1 = "account overview QPOC2 Rec B bannerClick";



trackAction(action1, cData);

var target = {};


setTimeout(function(){$(window).trigger('deep_link', target)},100);

document.getElementById('App_Demo1').style.display = "none";


2 Replies

Hi there, thanks for your question! This article on Target for Mobile Apps in the Target Help Documentation may be helpful here. Good luck!

Level 1
Level 1


Let me give you a background of the issue;

I have a mobile app (android/ios) that has analytics SDK implemented in it. It uses context data variables to send data to SC. I am running an experiment via Adobe Targetn on the app. Now, my requirement is this:

When the banner loads on the mobile app, I want to trigger an analytics calls i.e. trackAction or trackState that says something like pagename = "banner_seen"

when the user clicks on the banner, I want to trigger an analytics calls i.e. trackAction or trackState that says something like pagename = "banner_clicked"

How can i do this? from the offer code of my experiment, I cannot trigger a trackAction or trackState. So, how can i pass the values like "banner_seen" or "banner_clicked" over to SC?