analytics and file_download #7305
-
Hi. didn't seem this question fits with previous ones. I apologize if I should have posted elsewhere. My question: Is there a specific way to link to a pdf file so that the analytics cookies identify a download when visitors click on the link? Or is there something else at play here. My mkdocs.yml is here |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hello @moussatat, You can look at the implementation of the built-in analytics code for As you can see JavaScript is used to attach a function to the search, which uses the defined
So you would have to setup a similar code in your extra.js that would attach a special function that would send another "event" using a specified I would use
|
Beta Was this translation helpful? Give feedback.
-
Thanks for the guidance. I shall generalize the |
Beta Was this translation helpful? Give feedback.
Hello @moussatat,
the documentation page doesn't mention anything about file downloads. I'm talking about this page:
You can look at the implementation of the built-in analytics code for
search
here:mkdocs-material/src/templates/partials/integrations/analytics/google.html
Lines 40 to 49 in 12a8e82
As you can see JavaScript is used to at…