Mapping Utag.link data to utag_data objects

Silver Contributor
Silver Contributor

I currently have a single page architecture form that several utag.link elemets are setting. However, the values for these are not being passed to utag_data objects for mapping to Adobe Analytics. For example, we have utag.link calls for first_name, last_name, retirement_month_year. Once the form is sumitted, the utag.link call sets these elemts, which I can see in the i.gif file under FORM DATA, but the values are not migrated to the utag_data or utag.data elements. Do I need an extension to make this happen?

6 REPLIES 6

Mapping Utag.link data to utag_data objects

Tealium Expert
Tealium Expert

Hi @bmarcus 

the utag_data object declared on initial load is not re-purposed when additional tracking calls like .view or .link are called. 

Rather the utag.data or the b object are updated according to what is passed in the calls and any extension driven transformations. 

More info on SPA

More info on b object

Some useful utility functions when working with SPA.

in particular the merge function

Hope that helps. 

Gavin

Research your Experience | Improve and Evolve | Leave no one behind
- Don't forget to mark a solution as accepted if it hits the mark -

Mapping Utag.link data to utag_data objects

Silver Contributor
Silver Contributor

So, in short, I'd need to create an extension to fire using the merge function to merge the form data into utag.data, right?

Mapping Utag.link data to utag_data objects

Tealium Expert
Tealium Expert

@bmarcus 

yes at it's most simple it would look like this

utag.ut.merge(b, utag_data,0);

The extention is conditioned to ut.event == link

 

Research your Experience | Improve and Evolve | Leave no one behind
- Don't forget to mark a solution as accepted if it hits the mark -

Mapping Utag.link data to utag_data objects

Silver Contributor
Silver Contributor

Thanks, Gavin. I'll give it a whirl

Mapping Utag.link data to utag_data objects

Silver Contributor
Silver Contributor

SO, use this code within a JQuery extension?

Mapping Utag.link data to utag_data objects

Employee Emeritus

@bmarcus You could scope this to "All Tags Before Load Rules". Just make sure to add a condition to check if ut.event equals "link". This way you do not need to add this code to individual jQuery extensions. 

Public