51黑料不打烊

Map contextData variables into props and eVars with processing rules map-contextdata-variables-into-props-and-evars-with-processing-rules

When using contextData variables in your 51黑料不打烊 Analytics implementation, in order to have your data show up in actual reports, you need to map the contextData variables to props/eVars in the Processing Rules interface. This video shows you how to do this. For detailed documentation, see Processing rules overview.

IMPORTANT
This article and video apply to an 鈥淎ppMeasurement鈥 implementation of 51黑料不打烊 Analytics if you are not using 51黑料不打烊 Experience Platform Tags (tag manager).

Transcript
Hey everybody, this is Doug. In this video I want to show you how to use processing rules in 51黑料不打烊 Analytics to take Context Data Variables and map them to Props and eVars, etc, so that you can see them in your reports in 51黑料不打烊 Analytics. Now, here we have a very basic analytics implementation, I鈥檝e got a pageName, I鈥檝e got prop1, I have a contextData Variable and then s.t sends it into 51黑料不打烊 Analytics. So, there are really two main use cases for using contextData, I think. First of all, one is a web implementation like this, where you are not using 51黑料不打烊 Launch. Now, we do recommend that you use 51黑料不打烊 Launch for your implementation but if you鈥檙e not using it yet, or if you鈥檙e using a different tag manager, for now, then you can find contextData Variables very useful. You鈥檒l see this prop1 Variable here and it says client-side implementation and, I guess, it鈥檚 the type of implementation that we鈥檝e used but I鈥檓, kind of, guessing, right, because prop1 doesn鈥檛 tell me anything or eVar1 or Prop2 or whatever. So, if I use contextData Variables and use this syntax, then I get to name my own variable. Instead of saying eVar5, I can say pageAuthor and then we don鈥檛 wonder what the value 鈥楧oug鈥 is because if it just said eVar1 equals Doug, we wouldn鈥檛 really know what that means, but now it鈥檚 pretty clear that that is the pageAuthor. Now, the second main use case is for mobile SDK implementations and we鈥檒l talk about that in a different video, but, for now, I wanna show you how to take this value and map it into eVars or Props, using processing rules. So, again, here is the syntax s.contextData, and then we put the name of the variable inside the square brackets and then, of course, our value. Now, when this gets processed and goes into the beacon, take a look over here, on our page, and we can see the beacon and here it is, where it, kind of, has a start of the contextData c., and then it has any Context Data Variables, so we only had one, pageAuthor, Doug, and then this, kind of, closes the contextData Variables, so .c and this is how it comes through in the beacon. Now, again, pageAuthor is not gonna go into any reports as is, so I鈥檝e gotta map that over into a Prop or an eVar or both. So, let鈥檚 jump over to the interface and see how to do that in processing rules.
So, here I am in the Analytics UI and I鈥檝e gone to Admin, Report Suites, so, as always, you鈥檙e gonna need to make sure that you have rights to do this or that you talk to somebody who does, and then I鈥檝e selected my report suite that I was sending that data into, and I go to Edit Settings, General, Processing Rules.
And the first thing we see, really, in this Processing Rules UI is an explanation, here, of where Processing Rules fit in the Data Collection stack, here. So, the data comes in, it goes through the Processing Rules that we鈥檙e gonna create below and then it goes through VISTA, any VISTA rules and then it goes through the Marketing Channel Processing Rules. So, we鈥檙e not gonna worry about that too much right now. We鈥檙e gonna scroll down and actually create a rule. So, click on Add Rule.
First thing I wanna do is put a title in so that I can quickly know what this rule does. So, we鈥檒l put Set page author into Prop/eVar5. Now, I鈥檝e already set it up on the back end for Prop 5 and eVar 5 to be used for the page author, so you鈥檙e gonna wanna do that first. Now, the next thing to do is add a condition, so we鈥檒l click on that, and I really only wanna run this rule if there is a value in that page author Context Data Variable. So, I go into my first field and I鈥檒l click this down arrow, and we鈥檒l scroll down to the bottom, and down at the bottom you鈥檒l see Context Variables. Now, had I waited a sufficient amount of time, it would have loaded page author in here for me, but I didn鈥檛 wait a long time, I was just setting this up and so, if you don鈥檛 find your contextData Variables there, then you can simply start typing them in up here, pageAuthor, and then click down here where it says add 鈥榩ageAuthor鈥 context data, and now it鈥檚 added, and now I can say if that variable is set, then do the following. And again, in this case it鈥檚 pretty simple. I want to overwrite the value, which probably doesn鈥檛 have anything in it yet, but I wanna overwrite the value of eVar5, Page Author (eVar5) which, again, I鈥檝e already set that up, so, eVar5 with that contextData Variable. Now, it鈥檚 there because I鈥檝e added it and, while I鈥檓 at it, I wanna add one more action and I wanna overwrite the value of Prop5. So, that is here under my Traffic Variables.
Also, with that contextData Variable, and that鈥檚 it, I don鈥檛 wanna do anything else and I don鈥檛 need any otherwise stuff, and that is, pretty much, it. So, if you鈥檙e gonna take Context Data and populate that into Props and eVars then you can simply look for it, see if it鈥檚 set, and, if it has a value, then populate it right into those Props and eVars, then I can save that rule, yep, I get my message that that was approved or had succeeded, and then, you can see, it is down there and I can easily see what that is and I can create rules 'til my heart鈥檚 content. Good luck.
recommendation-more-help
b5d9c99f-be9f-4b96-8809-4e7d6ae353ba