Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDF in custom URL isnot tracked as download #4090

Closed
anonymous-matomo-user opened this issue Aug 19, 2013 · 3 comments
Closed

PDF in custom URL isnot tracked as download #4090

anonymous-matomo-user opened this issue Aug 19, 2013 · 3 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc. worksforme The issue cannot be reproduced and things work as intended.
Milestone

Comments

@anonymous-matomo-user
Copy link

Hi,

I have a PHP - script in a TYPO3 installation that generates PDF documents. The link is call to a PHP -File with GET-Parameters. I use a onclick-Event on the link to track the download of the generated PDF-File.

My onclick Event is

var trackThisUrl = '/fileadmin/download/pdffiles/gernerateddocument.pdf';
_paq.push(["setCustomUrl", trackThisUrl);
_paq.push(['trackPageView']);

The call is tracked but it is not shown in Downloads.

I have allready set

_paq.push(["enableLinkTracking"]);
_paq.push(["addDownloadExtensions", "pdf"]); 

It doesn't work.

Thanks Atti

@mattab
Copy link
Member

mattab commented Sep 7, 2013

Use the function trackLink(sourceUrl, "download")

maybe this will work:

_paq.push(trackThisUrl, "download");

@mattab
Copy link
Member

mattab commented Sep 7, 2013

if it works, I should put that in some faq

@mattab
Copy link
Member

mattab commented Sep 26, 2013

@atti81 would you mind confirming if it works with the proposed code?

@anonymous-matomo-user anonymous-matomo-user added this to the 2.0.3 - Piwik 2.0.3 milestone Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. worksforme The issue cannot be reproduced and things work as intended.
Projects
None yet
Development

No branches or pull requests

2 participants