Expand my Community achievements bar.

SOLVED

How can I identify what documents a user is opening or downloading on a particular page

Avatar

Level 1

Hi.


I currently have a freeform table that shows how many times users visit the main page and then the subpage that contains documents.


My question is, is there a way to know which documents they open or download when they access the document page?

 

 

Thank you very much.

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor and Adobe Champion

Ah.. your segment might be causing this.. it's looking for a specific "Page" value... which as I said, doesn't fire on Actions...or rather, it fires on actions, but is removed before arriving in your suite data.

 

So this is a little odd, and something many of us have had to deal with for a while, but since you are new I will try to summarize this.

 

 

When you have a page view (and you look at all the data being sent in the call), you will see stuff like pageName=something and g=https://www....... etc (g being the Page URL)

 

And when you have an "action" which is a non-page view tracking call (like a click, or a download), you will also see pageName=something and g=https://www....... etc

However, on actions, before the data goes into your suite for reporting... both pageName and Page URL are removed... Adobe's rules are such that any tracking call that has a pageName or URL is a "page view", so all actions remove this so that your page views aren't inflated.

 

I know, it's a bit strange.

 

 

So many users do the following. They set up a "hit level" eVar to be a new "complete" page name value. You need to come up with a name that both represents what this is and doesn't cause confusion with the existing Page Name (which actually shows in the reports as "Page" - I like to use "Page Name")

 

Then on ALL page views and actions, I add this to my tracking (let's assume that we are using eVar1):

eVar1 = "D=pageName"

 

or in Launch:

Jennifer_Dungan_1-1674102624798.png

 

There are several benefits to this, beyond getting Page Name on your actions... eVars have a character limit of 255 characters, whereas the original pageName only has a max of 100 characters.

 

The D=**** notation is basically a shortform that allows you to duplicate the value of one dimension into another, without needing to pass the full string. And this is processed before pageName is removed from your action calls.

 

 

Now, this is fine for your custom rules... but as we know, default events like exit links, downloads, etc don't have a custom rule... and while you can do this, the default will still fire unless you completely suppress it, but this could result in losing downloads from another location that your custom rule doesn't pick up... 

 

So coming from the "old school" experience of implementing Adobe before Launch was a thing... you can add the following custom code in your Adobe Analytics extension to add dimension / event data (if needed) to your exit / download links.

 

In your Analytics Extension, scroll down to the "Configure Tracker Using Custom Code" and open the editor:

 

 

s.usePlugins = true;
function s_doPlugins(s) {
  if (s.linkType === 'e' || s.linkType === 'd'){
    s.eVar1 = "D=pageName";
    s.events = "";
    s.linkTrackEvents = "";
    s.linkTrackVars = "eVar1";
  }
}

s.doPlugins = s_doPlugins;

 

 

Basically, "usePlugins" and "s_doPlugins" is run as soon as soon as a server call is started, but before the data is bundled and sent to the server.

 

In this case, we are checking to see if this is an exit link (e) or a download link (d), then we set the eVar value (change the eVar for your implementation).

 

In this case, you don't really need the s.events or s.linkTrackEvents (unless you want to add a custom event onto this actions in addition to the default tracking). s.linkTrackVars will add any dimensions that are listed (comma separated) that have a value along with the tracking call. 

 

In theory, you could also add a URL as eVar2 and use:

s.usePlugins = true;
function s_doPlugins(s) {
  if (s.linkType === 'e' || s.linkType === 'd'){
    s.eVar1 = "D=pageName";
    s.eVar2 = "D=g";
    s.events = "";
    s.linkTrackEvents = "";
    s.linkTrackVars = "eVar1,eVar2";
  }
}

s.doPlugins = s_doPlugins;

 

You can add any dimension to these exit / download links in this way. (Make sure you test this code to ensure it's working as expected)

 

However, if you aren't using the D=**** which only works IF that parameter exists in the tracking call (pageName and g both do, they just get removed later), you would need to actually set the value of any custom dimensions you need added... but for now, this should get you a lot more control to do the report you want.

 

Then, your segment would use eVar1 (or whichever eVar you set up to hold this new Page Name value) instead of Page.

View solution in original post

5 Replies

Avatar

Community Advisor and Adobe Champion

Adobe has a built in function to track "downloads" based on file extensions (assuming this is set up and configured).

 

If a user clicks on a link that has an extension of ".docx" for instance, the URL of the document should be tracked as a "download" action... and the URLs will show in your "Download Link" dimension in your reporting....

 

However, this dimension may truncate depending on the length of your document URLs and you may not have enough to see the details you want, or maybe you want some additional context with those clicks.

 

In this case, you may want to create custom rules when users click to download your files and pass in additional dimension / event data.

 

 

The problem is that the "Page" value isn't available on actions, so if you need to know that this specifically came from the downloads page, you will need to add something like custom eVars that holds the page name, url, etc..

 

But I would first check your existing "Download Link" dimension and see where you might need to go from there.

Avatar

Level 1

Thank you very much.

Yes, I was able to locate the download name.

 

There are several file types here, including.xls,.pdf, and others.

 

The ones I'm looking for on the subpage are all related to "unspecified."

 

I am now just browsing through Google and this forum to see how I go about giving them a valid evar so they can be tracked.

Avatar

Community Advisor and Adobe Champion

When you say "related to unspecified" so you mean that the file name is unspecified, or that when you correlate to "Page" dimension, the page name is unspecified?

 

The Page dimension is not tracked on actions... so if you need to have the page, you will need to set up a custom prop or eVar to hold the page name or url, and then add that dimension to the tracking (either using a new custom tracking action, or adding the eVar to the existing download action)

 

I can certainly help you with this, but first I need to know your issue and what direction you want to take.

Avatar

Level 1

Thank you very much. I am still learning how to use Adobe Analytics. Thank you in advance for your understanding.

 

From what I can see the filename appears to be "unspecified."

 

Below is a screenshot of my freeform table.

 

danny23_1-1674086334268.png

 

 

Thank you 

Avatar

Correct answer by
Community Advisor and Adobe Champion

Ah.. your segment might be causing this.. it's looking for a specific "Page" value... which as I said, doesn't fire on Actions...or rather, it fires on actions, but is removed before arriving in your suite data.

 

So this is a little odd, and something many of us have had to deal with for a while, but since you are new I will try to summarize this.

 

 

When you have a page view (and you look at all the data being sent in the call), you will see stuff like pageName=something and g=https://www....... etc (g being the Page URL)

 

And when you have an "action" which is a non-page view tracking call (like a click, or a download), you will also see pageName=something and g=https://www....... etc

However, on actions, before the data goes into your suite for reporting... both pageName and Page URL are removed... Adobe's rules are such that any tracking call that has a pageName or URL is a "page view", so all actions remove this so that your page views aren't inflated.

 

I know, it's a bit strange.

 

 

So many users do the following. They set up a "hit level" eVar to be a new "complete" page name value. You need to come up with a name that both represents what this is and doesn't cause confusion with the existing Page Name (which actually shows in the reports as "Page" - I like to use "Page Name")

 

Then on ALL page views and actions, I add this to my tracking (let's assume that we are using eVar1):

eVar1 = "D=pageName"

 

or in Launch:

Jennifer_Dungan_1-1674102624798.png

 

There are several benefits to this, beyond getting Page Name on your actions... eVars have a character limit of 255 characters, whereas the original pageName only has a max of 100 characters.

 

The D=**** notation is basically a shortform that allows you to duplicate the value of one dimension into another, without needing to pass the full string. And this is processed before pageName is removed from your action calls.

 

 

Now, this is fine for your custom rules... but as we know, default events like exit links, downloads, etc don't have a custom rule... and while you can do this, the default will still fire unless you completely suppress it, but this could result in losing downloads from another location that your custom rule doesn't pick up... 

 

So coming from the "old school" experience of implementing Adobe before Launch was a thing... you can add the following custom code in your Adobe Analytics extension to add dimension / event data (if needed) to your exit / download links.

 

In your Analytics Extension, scroll down to the "Configure Tracker Using Custom Code" and open the editor:

 

 

s.usePlugins = true;
function s_doPlugins(s) {
  if (s.linkType === 'e' || s.linkType === 'd'){
    s.eVar1 = "D=pageName";
    s.events = "";
    s.linkTrackEvents = "";
    s.linkTrackVars = "eVar1";
  }
}

s.doPlugins = s_doPlugins;

 

 

Basically, "usePlugins" and "s_doPlugins" is run as soon as soon as a server call is started, but before the data is bundled and sent to the server.

 

In this case, we are checking to see if this is an exit link (e) or a download link (d), then we set the eVar value (change the eVar for your implementation).

 

In this case, you don't really need the s.events or s.linkTrackEvents (unless you want to add a custom event onto this actions in addition to the default tracking). s.linkTrackVars will add any dimensions that are listed (comma separated) that have a value along with the tracking call. 

 

In theory, you could also add a URL as eVar2 and use:

s.usePlugins = true;
function s_doPlugins(s) {
  if (s.linkType === 'e' || s.linkType === 'd'){
    s.eVar1 = "D=pageName";
    s.eVar2 = "D=g";
    s.events = "";
    s.linkTrackEvents = "";
    s.linkTrackVars = "eVar1,eVar2";
  }
}

s.doPlugins = s_doPlugins;

 

You can add any dimension to these exit / download links in this way. (Make sure you test this code to ensure it's working as expected)

 

However, if you aren't using the D=**** which only works IF that parameter exists in the tracking call (pageName and g both do, they just get removed later), you would need to actually set the value of any custom dimensions you need added... but for now, this should get you a lot more control to do the report you want.

 

Then, your segment would use eVar1 (or whichever eVar you set up to hold this new Page Name value) instead of Page.