Reply
Highlighted
Visitor
Posts: 7
Registered: ‎06-05-2017

s.tl issues with Adobe Analytics

I am trying to send data to adobe analytics through Tealium, we are using Adobe's s.code but are having issues with s.tl and utag.link causing a double event to be fired.  This is my current code:

var facebookShare = document.getElementsByClassName('fb-social social-btn')
for (var i in facebookShare) {
     facebookShare[i].onclick = function () {
          //Omniture Code
          s.linkTrackVars = 'eVar32,prop32,events';
          s.linkTrackEvents = 'event19';
          s.events = 'event19';
          s.eVar32 = 'facebook-event';
          s.prop32 = 'facebook-event';
          s.tl(this, 'o', 'facebookShare');
          //Tealium Code
          utag.link({
               action: "facebookShare"
          },null,[3]);
     };
};

I have treid adding the null,[3] to the end to stop the second tag from firing, but it is not working.

Is there a way to write the function with out s.code and let utag.link handle the entire event?

Thanks in advance!

 

Reply
0 Kudos
Tealium Employee
Posts: 347
Registered: ‎09-01-2015

Re: s.tl issues with Adobe Analytics

@weshancock1981

You should indeed be able to do it all of this via the utag.link call, however saying that I'm slightly confused if you say you are getting a double call. Just to clarify, if you have the JS extension scoped to the Adobe tag (which is UID #3), and also send a utag.link with [3] that will trigger the same tag to do 2 link events.

You can pass all the data that you are setting in the anonymous function through to the utag link, and then just map the data to the tag, using the mappings screen.

var facebookShare = document.getElementsByClassName('fb-social social-btn')
for (var i in facebookShare) {
     facebookShare[i].onclick = function () {
          //Tealium Code
          utag.link({
               action: "facebookShare",
               eVar32 : 'facebook-event',
               prop32 : 'facebook-event', 
              events : "event19"
          },null,[3]);
     };
};

 

I would also maybe think about moving this out of the scope of the tag, as this function will only run once the tag has been called once (most likely pageview). DOM Ready might be a better scope.

Adrian

Ask me anything Tealium related or Javascript, or NodeJS. But not cooking, can't do that.
Please remember to mark solutions as accepted for future searchers.
Visitor
Posts: 7
Registered: ‎06-05-2017

Re: s.tl issues with Adobe Analytics

[ Edited ]

So I am getting closer to getting the data to show in Adobe Analytics, @adrian_browning.  I am currently using the following code

var facebookShare = document.getElementsByClassName('fb-social social-btn')
for (var i in facebookShare) {
     facebookShare[i].onclick = function () {
          utag.data['adobe_eVars'] = 'eVar32'
          utag.data['adobe_event'] = 'event19'
          utag.data['adobe_event_type'] = 'facebook_share'
          utag.link({
               linkTrackVars: utag.data['adobe_eVars'],
               linkTrackEvents: utag.data['adobe_event'],
               link_text: utag.data['adobe_event_type'],
               action: utag.data['adobe_event_type']
          }), null, [];
     };
};

Using the above code, in console when I type s.linkTrackVars I get "eVar32",

When I type utag.data.adobe_event_type I get "facebook_share",

I have my mapping in Tealium IQ set to "adobe_event_type = eVar32"

But the connection is not being made so I dont see the data in adobe analytics, but the event19 code works perfectly ???

Reply
0 Kudos
Tealium Employee
Posts: 347
Registered: ‎09-01-2015

Re: s.tl issues with Adobe Analytics

@weshancock1981

So the first thing I noticed is that you have the null, [] after the end of the  utag.link function.
This means it will fire on all tags, however, if you did add it to the function ( utag.link({....}, null, []);) call you would end up with nothing firing, due to the array being empty.

I think we will need to have a look at your setup, you can even DM me on TLC or raise a support ticket, (the bell icon top right, with Support Desk), and someone can go through with you in the profile you have set up, and see what is missing.

Adrian

 

Ask me anything Tealium related or Javascript, or NodeJS. But not cooking, can't do that.
Please remember to mark solutions as accepted for future searchers.
Community Manager
Posts: 918
Registered: ‎08-26-2015

Re: s.tl issues with Adobe Analytics

Hello @weshancock1981. I have notified your account manager @melanie_armenda. Let us know if you have any other questions. 

Remember to give me a kudo if you like my post! Accepting my post as a solution is even better! Also remember that search is your friend.
Reply
0 Kudos