Cross posting from #2149873: Incompatible with Google Analytics module download click event

The download event tracking provided by the Google Analytics module is incompatible with the file url rewriting that file entity employs.

File entity rewrites everything to /file/ID/download so when the javascript click event fires on the link the javascript scans to see whether one of the tracked file types is being clicked on. Because the url does not have an extension that matches (it has no extension at all) it doesn't trigger a download event in Analytics.

Feel free to mark this as works as designed as I think both modules work as designed, I just wanted to raise this as an issue and offer a workaround (in the linked issue in the file entity issue queue).

Comments

hass’s picture

Category: Bug report » Support request
Status: Active » Fixed

I don't know what you expect from a statistic that has the same url all times. Makes no sense to me.

Please change file entity module to include the file extension.

tanc’s picture

I don't expect anything from this module hass, this post is for the next unfortunate soul who comes across this problem when using both these modules and searches in this issue queue. The (temporary) solution is in the linked issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

Dave Reid’s picture

We cannot and should not include the extension in the URL. We could include a data attribute on those links with the filename or something that will be helpful for the Google Analytics module to track, but frankly I need help from the maintainer here in what we should support.

tanc’s picture

Status: Closed (fixed) » Active

I'm going to re-open this as the maintainer of File Entity module is asking for help to make the modules compatible.

hass’s picture

Why is it a problem in adding the real filename path?

hass’s picture

Status: Active » Closed (won't fix)

No feedback