Trying to figure out how to use utag.link to replace s.tl

Gold Contributor
Gold Contributor

I have received the following documentation, link-tracking_utag.link-utag.view.pdf, but it does not help me. I've viewed this page, https://community.tealiumiq.com/t5/Analytics-and-Data/How-do-I-use-utag-link-with-SiteCatalyst/m-p/5..., and followed the example, but it does not work either.

I'm trying to replicate the following SiteCatalyst command:

s.tl(this, 'o', 'myTrackString')

which submits the following beacon:

http://odc.weather.com/b/ss/twcdev/1/H.23.4/s68153335715178?AQB=1&ndh=1&t=10%2F0%2F2014%2014%3A51%3A54%205%20300&ns=twci&pageName=HOMEPAGE%3A%2Findex.html&g=http%3A%2F%2Ftwcrb.dev%2Fadstest%2F30068&cc=USD&s=2560x1440&c=24&j=1.6&v=Y&k=Y&bw=1777&bh=776&p=Widevine%20Content%20Decryption%20Module%3BShockwave%20Flash%3BChrome%20Remote%20Desktop%20Viewer%3BNative%20Client%3BChrome%20PDF%20Viewer%3BCitrix%20Online%20Web%20Deployment%20Plugin%201.0.0.92%3BWebEx64%20General%20Plugin%20Container%3BDefault%20Browser%20Helper%3BFlip4Mac%20Windows%20Media%20Plugin%202.3.6%20%3BGoogle%20Talk%20Plugin%3BiPhotoPhotocast%3BGoogle%20Talk%20Plugin%20Video%20Accelerator%3BGoogle%20Talk%20Plugin%20Video%20Renderer%3BMicrosoft%20Office%20Live%20Plug-in%3BQuickTime%20Plug-in%207.7.3%3BSharePoint%20Browser%20Plug-in%3BSilverlight%20Plug-In%3B&pe=lnk_o&pev2=myTrackString&AQE=1

The important piece here is the "pev2" param, which contains 'myTrackString'

I want to do the same thing with the utag.link command, since I thought this replaced s.tl. I've tried

utag.link{link_obj: this, link_type: 'o', link_text: 'myTrackString'})

, which I saw in one of the posts listed in the first paragraph above. This does not work. No documentation anywhere seems to be available to enable a beacon that looks like the one above for s.tl. Am I confused? Does utag.link replace s.tl?

When I print the method utag.link, there appears to be two arguments for it , utag.link(a,c). However, all the documentation I can find only shows passing one argument as an object. But, nothing I've done results in the beacon link above.

Thanks,
steve

9 REPLIES 9

Trying to figure out how to use utag.link to replace s.tl

Employee Emeritus

Hey Steve,

You are correct. utag.link does replace s.tl().

Currently all that is needed to populate the "pev2" parameter is send "link_text" OR "link_name" as a parameter in your utag.link function.

It would be something like this:

utag.link({link_text:"myTrackString"})

That will trigger the s.tl() function and use the value from link_text as the pev2 parameter.

There is an update coming to the SiteCatalyst tag that will allow you to map a value to the pev2 parameter, but currently you'll need to use either link_text or link_name to accomplish this.

Hope this helps. Please reach out with further questions or clarifications.

Thanks

Trying to figure out how to use utag.link to replace s.tl

Employee Emeritus

In addition to the above, if you want to pass additional information in the utag.link call you will need to add those parameters into the object like so:

utag.link({page_name:"homepage",link_test:"myTrackString",page_type:"home"})

Trying to figure out how to use utag.link to replace s.tl

Employee Emeritus

Hello Steve,

The utag.link isn't a straight replacement but instead replaces the functionality. The argument for utag.link is a UDO or utag_data object i.e. utag.link({link_name:"lname", link_type:"click"}). You can pass link_text, linkTrackVars, and linkTrackEvents which will get picked up and passed to Site Catalyst with having to map. For your example above I would suggest the following:

utag.link({link_text:"myTrackString"});

Trying to figure out how to use utag.link to replace s.tl

Employee Emeritus

Good Point Jon! utag.link does not overwrite s.tl().

As a general rule, it is a best practice to not pass "linkTrackVars" or "linkTrackEvents" in the utag.link function. LinkTrackVars and LinkTrackEvents will get automatically set within the SC tag template depending on what is mapped. This will help eliminate the need to update the linkTrackVars and/or linkTrackEvents variables in the utag.link function if you want to pass additional data later on.

If you have a situation where you have to hardcode linkTrackVars and/or linkTrackEvents this can be done in a Set Data Values Extension with something like the following:

Set linkTrackVars To: Text : eVar1,eVar2
When link_text EQUALS "myTrackString"

Trying to figure out how to use utag.link to replace s.tl

Gold Contributor
Gold Contributor

Thanks everyone. Great help.

 

Just a note: utag.link({link_name:"myTrackString"}) works to set pev2 utag.link({link_text:"myTrackString"}) DOES NOT set pev2

Trying to figure out how to use utag.link to replace s.tl

Employee Emeritus

Steve,

What version of the SiteCatalyst Tag are you using. I just re-tested this in my sandbox and they are both working using H26.

Our template has the following logic in the latest versions:

1) If link_name exists use it to populate pev2
2) If link_name does not exist check for link_text. If link_text exists then use it to populate pev2
3) If neither exist populate pev2 with "no link_name"

Trying to figure out how to use utag.link to replace s.tl

Employee Emeritus

Steve,

 

Something to add-on here. If you want to send additional variables on link calls you can look in to the base variables in the publish settings. This has been helpful in the past for me.

Trying to figure out how to use utag.link to replace s.tl

Gold Contributor
Gold Contributor

I just checked and I'm configured to use H26, but I was unable to get link_text to populate pev2 in the absence of link_name. Not sure what is going on. I'll experiment further.

 

Thanks,

 

steve

Trying to figure out how to use utag.link to replace s.tl

Bronze Contributor
Bronze Contributor

Very helpful. How would I

 

(1) fire an Omniture event like add to cart, and

(2) populate the product string with the correct product in the same utag.link call?

Public