How can we map a page variable inside a link call?

Silver Contributor
Silver Contributor

I have a scenario where I want to capture and manipulate the variables from link call before sending to adobe.

Example:

js page variable:

{
pageName: home
name: pop-up,
action: none
}

I am getting this data variable in a link call. I want to manipulate it in an extension before sending it to adobe. 
Which scope should I use for the extension? 

3 REPLIES 3

How can we map a page variable inside a link call?

Tealium Expert
Tealium Expert

You have three choices that would technically work:

  1. Before Load Rules
    This scope manipulates the data very early in the Tealium event flow and as a result the updated data would be available to load rules, which would allow you to conditionally load a specific tag based on the revised data. Based on how you're describing this, I don't think that's the right fit for you
  2. After Load Rules
    This scope manipulates the data after load rules have been evaluated and is the default scope for this type of extension. The updated data will be available to all tags that are configured to receive this data type (given that it's a utag.link call that probably won't be every tag, but it might be more than just the Adobe tag)
  3. Tag-Scoped Extension
    Scoping the extension to just the Adobe tag, the data manipulation would run as that tag executes as part of it emitting the data, and ensures that the changes you're making are only available to the Adobe Analytics tag

Both options 2 and 3 feel like they'd be suitable here. You should select option 3 if other tags need to receive the same data without the modifications you're proposing to make, and you should select option 2 if you want to be able to make the modified data available to other tags (for example to maintain consistency across different reporting mechanisms).

In general I find it better practice to maintain a single event payload across multiple tags so that there aren't vendor-specific overrides that potentially put data out of sync across different technologies, but if it really needs to just be changed in the Adobe tag, then the tag-scoped extension is best.

How can we map a page variable inside a link call?

Silver Contributor
Silver Contributor

Thanks you. Looks like I can use the 'After Load Rules'. 
Does the utag.js script re-executes from the beginning for a link call? 
How can I make my extension to run only on a link call? Can I use utag_data.tealium_event in 'After Load Rules' extension?

How can we map a page variable inside a link call?

Tealium Expert
Tealium Expert
  • Extensions scoped to After Load Rules execute on every utag.link event
  • Extensions scoped to Before Load Rules execute on every utag.link event except those that pass an array of specific tags to fire as the third argument of the function.
  • Extensions scoped to specific tags execute on every utag.link provided that the tag is loaded (i.e. it's passed load rules or has been specifically invoked as part of the utag.link call via the third argument) and the tag is enabled for link calls (which the AppMeasurement tag is)

Within the extension conditions, you can specify the prerequisites for the extension being executed. In order to just scope an extension to link events, you can use the condition "(UTAG) event (js) equals link", otherwise aliased as ut.event, which then means that the extension would only fire if it's a link rather than view event. You can further constrain the trigger using the conditions to cause it to only run when specific values of other fields are set if required.

Public