Expand my Community achievements bar.

Join us for the next Community Q&A Coffee Break on Tuesday April 23, 2024 with Eric Matisoff, Principal Evangelist, Analytics & Data Science, who will join us to discuss all the big news and announcements from Summit 2024!
SOLVED

Calculating Traffic Share for Pages

Avatar

Level 1

Hi,
I needed help in creating a calculated metric which can calculate traffic share of a particular page within a select segment of multiple pages.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

You should still be able to do this.. 

 

If you have Page X, Y, Z.. etc as your breakdown.... and a column for PVs (which will show the PVs for each of those pages)

 

Then you should be able to create a calculated metric which is just PVs / (PV Page X + PV Page Z + PV Page W + PV Page U + PV Page V)

The preview of the metric will look weird, since it will be trying to look at ALL PVs, but once used in the breakdown table, it should be okay...

View solution in original post

3 Replies

Avatar

Community Advisor

Just to clarify, basically let's say you have a site with 100 pages... and you want to know the % of traffic to 1 specific page out of a subset of say "5 different pages"?

 

So you don't just want "Page Views on Page X / All Pages Views" (as a percent)

but rather

"Page Views Page X / (PV Page X + PV Page Z + PV Page W + PV Page U + PV Page V)"

 

The easier way is to create a HIT based segment looking for Page X

and another HIT based segment looking for "Page X OR Page Z OR Page W OR Page U OR Page V" (if those pages share a common site section or other dimension, you could just look for HIT where the Site Section equals "value")

 

Now, if you create a freeform table, you can create a column stacking Page Views with the Segment for Page X, then to the right of that, create a second column using Page Views stacked with the Segment for your Pages Subset... Make sure the metric is on top (I find this works better), select the headers of the two columns (metric and segments), right click and select "Create Metric from Selection", this will open a sub-menu, select "Divide".

 

This should create a calculated metric to the right which is column A divided by column B.... Now, hopefully you have the rights to edit your own calculated metric... 

 

Select this new metric, and click on the (i) icon, this will bring up a little preview window, and from there, you will need to click on the pencil (IF you don't have the pencil, you may need an admin to help you).

 

Clicking on the pencil will open the calculated metric builder... here you can change the name to something more appropriate, change the format to "Percent" and you can adjust the number or decimal places:

 

Jennifer_Dungan_0-1680039723698.png

 

 

If the definition has the division in the wrong order, you can drag the items around, but you should see your segments built right into the definition.

 

If you need this added a permanent calculated metric, you can also add it to your components list by checking this box:

Jennifer_Dungan_1-1680039851798.png

 

But check with your internal process.. I try to ensure that permanent metrics come from only a select few users so that we can keep the list under control, and all other calculated metrics are used as project only.

 

Once you have made you changes, save... 

 

Now you can drag that metric to other tables or uses within your project.

Avatar

Level 1

Hi Jennifer, thank you for your reply.

And yes, I am looking for something like this - "Page Views Page X / (PV Page X + PV Page Z + PV Page W + PV Page U + PV Page V)" but also I am looking to have this calculated metric work for PV Page Z, W, and so on in a single freeform table

Avatar

Correct answer by
Community Advisor

You should still be able to do this.. 

 

If you have Page X, Y, Z.. etc as your breakdown.... and a column for PVs (which will show the PVs for each of those pages)

 

Then you should be able to create a calculated metric which is just PVs / (PV Page X + PV Page Z + PV Page W + PV Page U + PV Page V)

The preview of the metric will look weird, since it will be trying to look at ALL PVs, but once used in the breakdown table, it should be okay...