Reply
Highlighted
Contributor
Posts: 119
Registered: ‎11-06-2015
Accepted Solution

Adobe Target & Visitor API directly on site and Analytics via Tealium iQ

This is similar to https://community.tealiumiq.com/t5/Tealium-iQ-Tag-Management/Adobe-Target-directly-on-site-and-Adobe... , however the case is different as we will get the Visitor API Call AND Target on the site itself (not implemented via Tealium), all before Tealium's utag.js loads which executes Adobe Analytics.

How can I make sure that this will work?

Specifically, I want to 

1. prevent yet another call to the Visitor API in the Adobe Analytics tag (how can I make Analytics use the Visitor ID that was already generated through the Visitor API call on the site?

2. Still have the Adobe Analytics tag make a Visitor API call in case the site has not made the Visitor API call successfully (or we are on one of our subsites without Target)?

Using Tealium's Target beta tag did not work for us as we load Tealium's utag.js at the bottom of the body and there was still some considerable flickering due to that (the effect of that Tag which "whitens" the page came too late, so we had the page load, then get white and then reappear again).

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

Re: Adobe Target & Visitor API directly on site and Analytics via Tealium iQ

Hi @loldenburg,

So to take this in order:

  1. If you have the latest version of the Adobe Analytics tag (which doesn't have the raw visitor code), then I would suggest mapping the window level visitor response to the Adobe config. Something like window.Visitor.getInstance("XXXXXXXXXXXXXXXXXXXxx@AdobeOrg").getMarketingCloudVisitorID();
  2. I would add the Adobe Marketing Cloud ID Service tag, with a load rule that checks the above value to make sure that it isn't there. That way will only fire and pass to AA on pages it doesn't load.

Hope that helps,

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.
Contributor
Posts: 119
Registered: ‎11-06-2015

Re: Adobe Target & Visitor API directly on site and Analytics via Tealium iQ

Ok, thank you. To repeat:

1. Add Marketing Cloud Visitor API tag to check if visitor API has been fired correctly
2. Add newest version of Adobe Analytics tag
3. Map the window level visitor response to the Adobe config => that I don't quite understand. What "config" do you mean?
Reply
0 Kudos
Tealium Employee
Posts: 344
Registered: ‎09-01-2015

Re: Adobe Target & Visitor API directly on site and Analytics via Tealium iQ

@loldenburg

Sorry didn't mean to mix my terminology. Very simply map the grabbed mcid value to the Adobe Analytics tag.

2018-02-02_1607.png

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.
Contributor
Posts: 119
Registered: ‎11-06-2015

Re: Adobe Target & Visitor API directly on site and Analytics via Tealium iQ

Great, thanks. Just to be 100% clear. With MCID you mean the Marketing Cloud ID (that one can also be set directly in the Tag Settings without Mapping, right?). The Marketing Cloud VISITOR ID is retrieved automatically by the newest Adobe tag, correct?
Sorry for so many questions, but this is a delicate affair... :) (I won't ask you about cooking)


Btw: The Tealium Tag is on 2.6.0 (I think there is a newer one out there) and VAPI is on 2.5.0 (newest at Adobe is 3.0.0), so great if Tealium provided an update soon.
Reply
0 Kudos
Tealium Employee
Posts: 344
Registered: ‎09-01-2015

Re: Adobe Target & Visitor API directly on site and Analytics via Tealium iQ

Hi @loldenburg

I'm glad you got me to double check. The "better" solution is to do this in a scoped extension. And not mappings.

window[<your "s" object>].visitor = window.Visitor.getInstance("XXXXXXXXXXXXXXXXXXXxx@AdobeOrg");


That way when the call to Adobe goes out the correct referencing is done.
This only needs to be done, if the inline visitor service has worked, else the Tealium tags will sort this out themselves.

I'll put in a request to get those tags updated to the latest version for you as well.

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.
Contributor
Posts: 119
Registered: ‎11-06-2015

Re: Adobe Target & Visitor API directly on site and Analytics via Tealium iQ

[ Edited ]

Ok, thanks, @adrian_browning.
It seems to work, but I had quite a struggle finding out how to set the customerIDs. The documentation on the Visitor API via Tealium should be updated: https://community.tealiumiq.com/t5/iQ-Tag-Management/Implementing-the-SiteCatalyst-Visitor-API/ta-p/... . Right now it covers only the old SiteCatalyst tag which hopefully noone uses anymore ;). Somewhere it should also be shown how to set the Customer Authentication States with some examples.

For the case at hand, my impression is that:
a) if we want to set CustomerIDs and the Visitor API loads inline (not via Tealium iQ), we need to set the CustomerIDs in an Extension scoped to the Adobe Analytics tag (and there, doing as you said: getting the visitor object via

window[<your "s" object>].visitor = window.Visitor.getInstance("XXXXXXXXXXXXXXXXXXXxx@AdobeOrg");

and then setting the different customerIDs:

window[your "s" object].visitor.setCustomerIDs({ 
// as documented by Adobe here: https://marketing.adobe.com/resources/help/en_US/mcvid/mcvid_setcustomerids.html
});

 

b) if we want to set CustomerIDs and the Visitor API loads via Tealium iQ's Marketing Cloud Visitor ID Service, we need to set the CustomerIDs via mapping in that Visitor ID Tag or via an Extension scoped to that tag. 

An Extension is imho also the only way to set the correct Authentication States (because those are not strings like the IDs,but objects).

Example:

if (b["user_loggedin"] === "n")
     {
     b["user_loggedin"] = Visitor.AuthState.AUTHENTICATED;
     }
else
     {
     b["user_loggedin"] = Visitor.AuthState.LOGGED_OUT;
     }

(and then map user_loggedin to the Authentication State variable of the respective customerID in the MC Visitor ID Service Tag)

I am sure there will be others with similar issues, so as I said, I think it would make sense to add this to the Knowledge Base and link to it from the MC Visitor ID Service Tag in some form.

Tealium Employee
Posts: 344
Registered: ‎09-01-2015

Re: Adobe Target & Visitor API directly on site and Analytics via Tealium iQ

Hi @loldenburg

I've requested that we get that document updated with the latest Adobe Analytics Tag, and using the Adobe Marketing Cloud ID Service as well.

I will agree, looking the mapping toolbox for the AMCIDS tag, is somewhat a bit confusing around this, however, you can specify when you select authState, the "customerID" (authState) would have the string literal of e.g. "AUTHENTICATED" which will then be converted into the relevant authState object. I've also raised a request to get this updated so it is more user-friendly.

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.
Contributor
Posts: 119
Registered: ‎11-06-2015

Re: Adobe Target & Visitor API directly on site and Analytics via Tealium iQ

Hi @adrian_browning

Thanks, but I cannot specify a string literal there. I can only say "authState" should have the value of a UDO variable, e.g. "user_loggedin".

Clipboard0111.jpg

Or do you mean that if the value of "user_loggedin" contains "AUTHENTICATED", Tealium would convert it into the object Visitor.AuthState.AUTHENTICATED?

Reply
0 Kudos
Contributor
Posts: 119
Registered: ‎11-06-2015

Re: Adobe Target & Visitor API directly on site and Analytics via Tealium iQ

Ok I tried that:
"Or do you mean that if the value of "user_loggedin" contains "AUTHENTICATED", Tealium would convert it into the object Visitor.AuthState.AUTHENTICATED?"

And that solves the trick. But how in the world am I going to know this just from the Tag documentation???
Reply
0 Kudos
Tealium Employee
Posts: 344
Registered: ‎09-01-2015

Re: Adobe Target & Visitor API directly on site and Analytics via Tealium iQ

@loldenburg 

Completely agree, hence I have requested the Mapping toolbox & documentation be updated for this.

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.
Contributor
Posts: 119
Registered: ‎11-06-2015

Re: Adobe Target & Visitor API directly on site and Analytics via Tealium iQ

Ah shucks now my Analytics-Tag-scoped Extension does not set Authentication State anymore at all. It says that window.Visitor.AuthState does not exist...
Reply
0 Kudos
Contributor
Posts: 119
Registered: ‎11-06-2015

Re: Adobe Target & Visitor API directly on site and Analytics via Tealium iQ

Seems like that instead of Visitor.AuthState.AUTHENTICATED or LOGGED_OUT, one can also write 1 or 2 or 0 directly. That seems to work, seems to be a bit unorthodox however.
Reply
0 Kudos