Map Web SDK variables into Adobe Analytics

Learn how to map analytics variables from the Web SDK through to Adobe Analytics using Processing Rules.

Transcript
Hey, everybody, it’s Doug. In this video, I want to show you how to map variables in the Web SDK to Adobe Analytics. So here I am in a sample business requirements document or BRD, and I have some internal search term business requirements up here. And I want to be able to put them into some eVars and a List Var, and I want to trigger some events and these kinds of things in Analytics. Well, how do I get them into, for example, these eVars? Because on my site, they’re in a data layer. And in the Web SDK, they’re in an XDM or experience data model schema with friendlier names. But again, when they land in Adobe Analytics, they have to go into, you know, eVars and props and events and those kinds of things. So, let’s jump over to a browser and see how this is going to map over. So let me start here in data collection in launch, and you’ll see that the only extension that I have besides the core extension is the Web SDK extension. Now I have configured that, you know, click right here.
And we’ll see that I’ve configured that to point at the edge configuration or data stream called Luma Web SDK Analytics Demo. Okay, so if I go into the data streams or the edge configurations, you can see that I am looking at this Luma Web SDK Analytics Demo. Okay, so that’s the right one. And I have mapped this to Adobe Analytics, so that’s on, and pointed it to my report suite right here. Now you’ll see, I’ve also enabled Platform. And so, it’s going into my Luma Web Events Dataset and using the schema there, etc. And we’ll see that back here in launch as I go to data elements, and as I look at my XDM element here. And I have all of these elements that it has pulled out of the schema in Platform. So really, everything is going into one of these objects and fields, you know, and sub-fields and sub-objects and these kinds of things like this. And so how do I get stuff from one of these into one of the props and eVars? So I have two answers for you. Answer number one is, some of them are going to be automatically done. I’ve got some documentation open here. And I will put a link to this documentation on the page under the video. But you’ll see here, if I scroll up, and we can see the title here, variables automatically mapped in Analytics. Okay, so this is in the Web SDK overview, and we’re talking about mapping data over to Adobe Analytics. And so basically, if you are using these fields, you can see there’s a bunch of 'em. There’re some commerce fields. There are some media fields or some environment stuff, browser details, etc. There’s some media stuff there. There’s lots of different stuff, including the web interaction stuff and the web page details stuff as well. And so basically, the idea here is that if Adobe knows where it should go, then we’ll put it there for you. And so, if you will use web.webPageDetails.name, we will automatically put it into the page name variable over in Adobe Analytics when you map things through the edge configuration. Same thing with, for example, site section, if you’ll use this web webPageDetails siteSection, if I go back to my data element, remember, it’s down here at the bottom. If I go web, webPageDetails, and I have all these here. If you will use these, then they will be automatically mapped to the things that we know they should, right, which is, you know, page name and server and site section and URL, etc.
So again, I’ll put this link in, and you can look at all the things that are automatically mapped over to Adobe Analytics. Now we come to the items that are not automatically mapped, right? So if I go back to my BRD, it’ll be, you know, things like this, internal search terms, well, that should go into eVar. And so, we don’t know which one you want, so we can’t put it in there automatically. The number of search results, you know, the filters and these kinds of things. And so, for everything else, you need to use processing rules. Let’s go back over.
And I’ll jump up here to the processing rules. So here are the processing rules for the report suite that I’m pushing all of this data to. And I’ve set up a couple of them here. You can see this first one I’ve named Search Terms Number of Results and Filters. So, if I expand that one, you can see what I’ve done. And basically, the bottom line is that you are going to be looking for a.x.stuff, okay? A.x.whatever. So, for example, if you going to do something with the webpage details stuff, you don’t need to write, I already said it’s automatically mapped over. But if it wasn’t, you would look for something called a.x.web.webPageDetails.name, etc., okay? So whatever you have in your schema, you can refer to it with a.x.whatever it is. So, you’ll see here that I have siteKnowledge.supportSiteSearch.term. So once again, going back, this matches up with the stuff that I have put right here in siteKnowledge, supportSiteSearch, .term. So, any of these that I’m using, and you can see that I have search terms, I’m using that one. I’m using refinementValue for my filters, and I’m using numberOfResults. And so those are all going to come over again with a.ex.siteKnowledge.supportSiteSearch.
you know, any one of these three. So, when we go back over to it, you can use these processing rules any way that you want. And I’ll show you what I’m doing in regard to these search terms, and that is I’m looking for if a.x.siteKnowledge.supportSiteSearch.term is set. So basically, if there is a search, and I have a search term, then I want to do all of this stuff. I want to put that search term into eVar10, as I had in my BRD. I want to set event4 which is my, “Hey, you did a site search.” I want to put the number of search results. So again, a.x.siteKnowledge.supportSiteSearch.numberOfResults, whatever it is, into eVar11. And if there are filters, and again, that was coming through this refine, here let me see, what is it, refine, refinementValue, that’s what it is. So refinementValue and put that into my internal search filters, which is a List Var. So, I’m going to do all those things in that rule. And then my second rule, adds on top of it, and that is, if the number of results, so if a.x.siteKnowledge.supportSiteSearch.numberOfResults equals zero, the word zero, which is the way I’m handling it, then we’re just going to set event5, because that is my zero search results event. So, I hope that makes sense. Basically, you know, you have a bunch of automatic ones that are coming over, like page name and a bunch of other ones. And then for everything else that would go into eVars or props or trigger events and those kinds of things, you simply need to go into the processing rules and use this format of a.x.whatever your schema is, And then you’ll be able to map those into the variables in Analytics. Hope that was helpful. Good luck. -

Additional Information

For a list of the automatically mapped variables from the Web SDK to Adobe Analytics, please see this documentation

NOTE: When setting up Processing Rules, you may find that the “a.x.[your schema]” variable is not automatically in the drop-down window. If it is not there, don’t panic. Just type it in according to the format, and add it as a contextData variable. After adding one or two, you may find that others are lazy-loaded.

recommendation-more-help
b5d9c99f-be9f-4b96-8809-4e7d6ae353ba