开发者

Drupal / Google Analytics giving error 404 when tracking downloads

I've been using the Drupal Google Analytics module (currently using 6x-3.1) for some time now, but have found that file downloads (in this case, PDFs) are showing up in GA as 404 errors. Like this:

/404.html?page=/files/docs/pdf/filename.pdf&from=http://www.example.com/product开发者_JAVA技巧s/widgets

I've confirmed that you can download the files perfectly fine on the site, so that isn't an issue.

Has anyone else seen this?


Actually, it turns out that everything was working fine. I didn't realize that downloads show up under Event Tracking. And the 404 errors showing up as page views, which were almost exclusively PDF files, truly were broken links. My client has a bunch of typos on her PDF links... it's just a coincidence that they showed up the same time I started trying to track downloads.


GA does not do automatic download tracking, so in order for that to be showing up in your reports, there has to be custom code somewhere that triggers a page view when user clicks a download link. And wherever that code is, it is pushing that specific value as the URL, either as a default value (if no argument is supplied in the trackPageView call, it uses the current location.href of the page), or as a specifically pushed value.

Since you are saying you are using a Drupal module, you should probably take it up at the drupal community, open a bug report or something.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜