Google Product Forums › Google Analytics › Number inflation issue in tracking referral and direct traffic to PDF files via the API -
I was hoping that you can help me with this. We are trying to track PDFs for a customer, but the one we are trying to capture is not a PDF link click (we are already fixing it!), But referrals for PDFs or Direct Traffic For example if PDF shows in Google search, we want to be able to track it, if someone clicked on PDF and opened it.
We have partially achieved this by using the API, but we are seeing a number of inflated numbers - for this incident - can be considered as much more reasonably reasonable. I suspect that this issue is related to bot / crawlers; However, when I look at referral traffic, I think that either reference (direct) or Google is theoretically for the most inflated numbers because we are collecting referral data, did not exclude bots / crawlers anyway should go? Am I missing something?
We are using Google Tag Manager and Universal Analytics.
Here are the variables we are setting up.
-
v - Google Edition -> "1"
-
Bid - Google Analytics ID for Customer
-
CID - A random number to make client requests unique.
-
T - Event hit type (set to "Event")
-
ec-event category (set to "pdf activity")
-
EA - Event Action "Direct Download" if the URL Referrer is empty, otherwise the "External Download" should probably change it to empty or empty it?
-
el - Event label (set to the raw URL of the request).
-
UIP - User's host address of user's IP address request
-
U - Set up the user agent of the user agent request.
-
Set the original string for the DR - URL referer.
And here is the relevant code (C # ASP.NET):
var data = New Name Value Collection () {{"v", "1"}, // version {"Tid", _googleAnalyticsClientId}, // tracking id / web property / property id {"Cid", Math. Round (2147483647 * n) .restring ()}, // Anonymous Client id {"T", "Event"}, // Event Hit Type {"ec", "PDF Activity"}, // Event Category is required. {"Ea", labelValue}, // Event Action. Necessary. {"El", label}, // The event label / proxy server requires the following two parameters // See: https://developers.google.com/analytics/devguides/collection/protocol/v1/devguide#using -a-proxy-server {"uip", context.Request.UserHostAddress}, // user IP address {"Ua", context.Request.UserAgent}, // User's user agent {"dr", context.Request. UrlReferrer! = Null? Context.Request.UrlReferrer.OriginalString: String.Empty}};
Thanks in advance for any help!
Comments
Post a Comment