Analytics
1.9K members online now
Understand information in your reports and troubleshoot reporting issues such as self-referrals, (not set) data, and inaccurate information
 
Guide Me
star_border
Reply

Page View Content

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

What variable triggers what is displayed as a page view (dl, dp, both?)?

 

I have a single page application running on AngularJS and I'm changing the URL with a hash. In real-time analytics it says that there are 448 people on the index page, which seems high to me. My question:

 

  1. Is this number an aggregate of all people on this application?
  2. Does GA fire a page view for dl and dp (if dp is present)? If so, that would explain the high number

Screen Shot 2017-01-11 at 10.49.50 AM.png

Page View Content

Visitor ✭ ✭ ✭
# 2
Visitor ✭ ✭ ✭

Hi, to get understanding on page view metric you should understand how it's beeing tracked.

There is measurement protocol, which is used to pass data to google analtytics.

Analytics.js generates request to google analytics server via same protocol.

So you should check required parametrs for correct page view tracking.

Also I would recomend to check your network resources while browsing your application. For single page view you should get a single pageview hit on google analytics /collect resource.

 

Page view hit parametrs example: https://developers.google.com/analytics/devguides/collection/protocol/v1/devguide#page

Few words about required parametrs for certain hit types: https://developers.google.com/analytics/devguides/collection/protocol/v1/reference#requiredHitTypes

Here is an answer for your starting question: https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#dp

 

Hope it'll help!

 

 

Page View Content

Explorer ✭ ✭ ☆
# 3
Explorer ✭ ✭ ☆

Hi @Spencer B ,

To answer your question:
- Only dl is normally used by analytics for hits which is your hostname+pagepath+querystring(?)
  you can use dh and dp to override the dl. (optional)
- In Angular JS, the hash part is not counted as different page URL by analytics, so you will get aggregate data. (Kindly verify this by checking through real time reports or browser debugger.)
- GA fires pageview if dl and dp are present and will take the dp value.

Hope this helps,
Thanks,
Ritwik

Page View Content

Visitor ✭ ✭ ✭
# 4
Visitor ✭ ✭ ✭

Thanks for your help Ritwik!

 

To followup, if GA receives dl and dp, will it fire a pageview event for dl and dp (as 2 separate events)? If so, that makes sense with what I'm seeing.

Marked as Best Answer.
Solution
Accepted by topic author Spencer B
January 2017

Re: Page View Content

[ Edited ]
Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭

Google Analytics collects hits. Not events. Event is a type of hit that Google Analytics collects.

Pageview also is a hit type. So basically one hit with proper parametres will produce one metric count in your reports.

 

Again.

https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#dp

Document Path

Optional.

The path portion of the page URL. Should begin with '/'. For 'pageview' hits, either &dl or both &dh and &dp have to be specified for the hit to be valid.

 Here is some simulation with hit builder and Real Time Content report.

Hit: Hit with only dl parametr

 

Report result:

test_dl_only.PNGdl

 

Hit: Hit with dl, dh, dp

Report result:

test_dl_dh_dp.PNGdl_dh_dp

 

Hit: Ht with dh, dp

Report result:

test_dh_dp.PNGdh_dp

 

As you can see in report result in either correct way to send pageview hit you get only one metric count in report.

 

Page View Content

Explorer ✭ ✭ ☆
# 6
Explorer ✭ ✭ ☆

Hi @Spencer B,

If GA receives dl and dp in one hit, it will only take dp value.(only 1 pageview hit).
You can check this hit builder which will show hit data in GA & might help you in implementation : https://ga-dev-tools.appspot.com/hit-builder/

Hope this helps,
Thanks,
Ritwik