With the latest version 2.1.0, the trackEvent doesn't seem to be working. I just want to track clicks on a link.
I am wondering if I have something set up incorrectly in my 'activity', although the documentation never explains how to actually set the things up in the 'activity' itself.
From the documentation: https://docs.adobe.com/help/en/target/using/implement-target/client-side/functions-overview/cmp-at_j...
I am using almost this exact code snippet:
<script>
$('a').click(function(event){
adobe.target.trackEvent({'mbox':'homePageHero'})
});
</script>
In fact here is my code for my page (using at.js 2.1.0 version.)
<!doctype html>
<html lang="en-US">
<head>
</head>
<body>
<a id="container1" href="https://forums.adobe.com/">Default content 1</a> test link 1
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="/js/thirdparty/at.2.1.0.min.js"></script>
<script type="text/javascript">
adobe.target.getOffer({
mbox: 'experience-mbox',
success: function(offers) {
adobe.target.applyOffer({
mbox: 'experience-mbox',
offer: offers,
selector: '#container1'
});
},
error: function(status, error) {
//error -nothing
console.log('Error', status, error);
},
timeout: 5000
});
$('#container1').click(function(event){
adobe.target.trackEvent({'mbox':'track-mbox'});
});
</script>
</body>
</html>
In my 'Activity' I set up experience-mbox as a location with two experiences, one is default and the second is updated text. The getOffer/applyOffer is working, this is getting changed. I added track-mbox as an additional location, it only has default content, since it is used for tracking.
Then in the Goal Metrics i made a conversion metric for when the trackEvent mbox track-mbox was viewed, this is how I previously set up other activities that used trackEvent.
Using the Adobe Cloud Debugger, I see two requests when I load the page, and when I click the page I see another one pop up. I haven't seen a call in the network tab (on the browser) though as I would expect.
Although I get this error when I turn on the trace
I get no other errors at any time.
End result is the report never shows my links being tracked.
I'm not sure what else to try. I set this up exactly like it used to work, and, it doesn't. Any suggestions / ideas?
Thank you for logging a Client Care ticket, Christa.
Update:
After internal investigation, we have found that the issue is isolated to hosts mapped to the "Development" environment, the issue does not occur on hosts mapped to the "Production" environment. We have an internal ticket logged for this (ref: TGT-35572).
Should anyone else experience this issue, please make sure to log a Client Care ticket with the Target activity name and the URL.
Update: Issue was resolved with a Target release.
Views
Replies
Total Likes
Views
Replies
Total Likes
We are seeing same issue on 2.10.0 version.
Thanks,
Tulasi.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Like
Replies
Views
Like
Replies
Views
Like
Replies