Highlighted

How to configure numeric events for Adobe Analytics

Rookie Contributor

Hi,

I need to track a "numeric event" in Adobe Analytics. We are using the "AppMeasurement for JS" Tag, but I found no way to configure a numeric event.
The format is defined by Adobe help like this:
s.events="event1,event2,event10=9.95" where event10 is what I want to set.

How do I need to configure Tealium to achieve this?

3 REPLIES 3
Highlighted

How to configure numeric events for Adobe Analytics

Employee Emeritus

Hey Sebastian,

This would require the use of the u.addEvent utility function.

I am going to pretend that you want to populate event10 with the value of your "order_tax" variable. The "order_tax" variable is found in your UDO (utag_data object) and contains the amount of tax for the order. In this case you would use this syntax:

In Tag version H26 and later:

u.addEvent('event10',b.order_tax)

In Tag version H24 and H25:

u.addEvent('event10='+b.order_tax)

You would use a Set Data Values Extension configures like:

Set: sc_events To: JS Code -> <use one of the example above depending on your tag version>

You can add a condition if desired to only let this populate when necessary. You can check out the following post for more information about how the Set Data Values Extension will be set up. See the section titled "Setting s.events in Extensions."

 

https://community.tealiumiq.com/t5/2-Tealium-iQ-Documentation/Adobe-Analytics-SiteCatalyst-Tag/ta-p/...

Highlighted

How to configure numeric events for Adobe Analytics

Bronze Contributor
Bronze Contributor

Hi 

I want to capture a pageload time in adobe analytics as a numeric event, 

I am writing this code to capture the value 

// Type your JavaScript code here...

window.onload = function () {
console.log("Page Load Time")
b.pageload_time = b.pageload_time || [];
var loadTime = window.performance.timing.domContentLoadedEventEnd-window.performance.timing.navigationStart;
console.log('Page loaded in '+ loadTime+'ms');
b.pageload_time=loadTime/1000;
s.linkTrackEvents = "event120";
s.events = "event120";
event120 = b.pageload_time;
console.log('adobe_pageloadtime');
s.t()
}

 

However the value is not getting against the event, though event 120 is firing 

Please share a solution for the same

Highlighted

How to configure numeric events for Adobe Analytics

Tealium Employee

Hi @SatyaVani 

Prior to DOM Ready the data layer is referenced as "utag_data".

After DOM Ready, the data layer is referenced as "utag.data"

The b object is available during the scope of a tag. For more info see the image at the bottom of this article: https://community.tealiumiq.com/t5/iQ-Tag-Management/Order-of-Operations/ta-p/326

I suggest referencing data using "utag.data" instead of "b" as the "b" object is not available at that time.

If I was implementing this, I would split this logic up into 2 parts:

1. Javascript Code extension (scoped as Preloader) – Calculate the timing, and adds this to the data layer (eg utag_data.timing_page_load = XXX).

2. Adobe tag – Add mapping for "timing_page_load" to event120