States represent screens or views in your app. Each time a new state is displayed in your application, for example, when a user navigates from the home page to the news feed,
trackState can be called to send in the State Name (Page Name in Analytics), as well as additional data. This video walks you through how to do it.
Hey everybody, this is Doug. In this video, I want to show you a very easy way to track exit links in Adobe Analytics using Launch. Now, exit links - just in case you don’t know what those are - are just links that take you off of your site. So, if you have a link to somewhere else, you can’t really put your code on the other page that’s going to load so you have to do it before you leave. You have to send that beacon into Analytics before you leave the site. So, in this case I have a little test page here that is tracked by Launch, and then I have a link to Adobe.com, for example, and that’s a different site than this, obviously. And so I want to be able to track clicks on that link to Adobe.com so that, in my data, I know how many times people have clicked on this link to go out to the other sites. And this is all based on a very simple configuration in Launch. So, let me pop over to Launch here and we are in the Extensions screen and Installed. I’ve installed the Analytics extension. I’m going to jump into that and I’ll scroll down a little bit to this Link Tracking section and now all you really need to do is look at this Outbound Links section and Track outbound links. That’s pretty much it as far as getting it up and running. Now, there’s a couple of things you can do here as far as Track and Never Track. If you have a very basic implementation, then you won’t need these at all, but you might need them in certain cases and you look at Never Track, it says that Links defined here will not be treated as exit links. Now, if you have a link on your site that goes to another page on your site, on the same domain, let me say it that way, then you don’t need to put those here. By default, they will not be tracked as exit links. But let’s say you have A.com and B.com and they are feeding data into the same report suite. If your links might go to those other domains, back and forth, then you don’t want those to be treated as exit links. You want them just treated like all one big, happy family. So, in that case, you definitely would put both of them here: A.com and Save that, and then add B.com and Save that. Now, any links in this property, when they click out to A.com or B.com, will not be treated as exit links. They will be treated as internal pathing from one of your pages to another one of your pages. So, that’s the very easy way to do it. Now, the only time you would really need to use Track is if you were doing some Never Track but there were parts of A.com where you did want them to be treated like an exit link, then maybe you could put those in here and those would definitely be treated by Launch as an exit link. But, by default, if you have this enabled and you are going to a different domain, it is already going to treat it like an exit link, so you don’t need to put every possible link in here in the Track section: it will automatically do it if you have links out. Let me show you how that’ll work. So, let me click back over to a site here, where I have a couple of links set up and we can see that on this page, if I refresh it, I do have Analytics and I can go down to this hit and I can see there’s a hit down here and it has a page name. This is a page load hit. Now, if I click to another page on this domain, we have our one hit down there and I click on that. There’s no hit that happens there. I’m going to go back and actually Preserve the log, so you can see again that when we click to another one it doesn’t do anything there. If I click back, I can’t get that page load hit again. But if I click to a different domain, like Adobe.com, then before it leaves this page it will give me a third hit. So we will watch that real closely. Boom - the third hit - and then actually as Adobe.com loads there are some hits on Adobe.com. But what we really care about is this third one that happened before we left the site. And if I scroll down on that hit, you’ll see that this is not a regular page load hit, but based on us seeing this pe: variable (page event variable) you can see that this is an exit link. That’s what this lnk_e means: it’s an exit link. Where to? Well, that’s pev1: right here - page event 1 - and this will tell you the link URL. So you can see this is an exit link and this is where it went. Now, what that will do is actually then put this value of pev1: into an exit links report and it will know to go to the exit links report, again because of this lnk_e. So, if we jump over to the Exit Links Report, we can see that indeed there is Adobe.com there because I’ve already clicked on that and then that’s had some time to get into that report. But that is the basic thing - you just simply go into Launch, into the configuration of the Analytics extension, and make sure this is checked. And again, if you need to have more than one domain for your report suite, then put them here so that you can Never Track them as exit links, but keep them internally and treated as pathing. That’s pretty much it. Other than that, it will track those exit links for you in the Exit Links Report and, of course, in Workspace too. This is just the old-school report here that I brought up, but that’s pretty much it. That’s really quick and easy and there are other ways for you to track exit links where you can set additional variables and you can put a friendly name on here if you want, but those are all done through custom links and not through this quick and easy exit links report. So if you just need some quick, easy exit link reporting, do what I just showed you. And if you need some more control over that, to maybe set some variables or friendly names or those kinds of things, then you’ll want to do a custom link and that’ll be in a different video. Good luck.
For more information about trackState, please see the documentation.