I am using Sitecore 9.1.1 with SXA 1.8.1. I have a set of pdfs stored externally but I would like to use Sitecore Analytics to register download page events when someone is downloading the documents.

What would be the easiest way to do that? It is quite straightforward to track documents that are stored inside the Media Library but are there any OOTB solution to track external links or it requires custom development?

The links to the documents are rendered on the sitecore pages either in Rich text or General link fields but the documents they are pointing to are stored on external hosting which I do not own/have control over.

  • Well of course. The external site would need to make it known to Sitecore, one way or another, that a download happened. The download happens between the browser client and the external site, Sitecore is not otherwise involved.
    – Mark Cassidy
    Commented Apr 8, 2021 at 8:19
  • Are you showing these pdf links on your sitecore pages or you are trying to track the download from an external website? Commented Apr 8, 2021 at 8:25
  • I edited the question to clarify that, the links are on sitecore pages.
    – 9_9
    Commented Apr 8, 2021 at 9:35

1 Answer 1


Depending on the approach this would require some custom development as ootb it is not possible. Since the pdfs links are shown in your pages, one solution would be to track the click event on them.

You could handle this from javascript and then do an ajax call to register the page event on the sitecore side, you can take a look at a step by step approach described on https://sitecorescientist.com/2019/03/26/click-tracking-with-goals-and-page-events-using-sitecore-analytics/. If you don't want to use a handler to register the event, instead build a simple api which will handle this. See the sitecore documentation on registering events https://doc.sitecore.com/developers/91/sitecore-experience-platform/en/page-events.html

Another option would be to enable FXM for your website and use the API to track the click event.

SCBeacon.trackEvent(“Page visited”)
SCBeacon.trackEvent(“Page visited”, { data: “custom data”, dataKey: “custom data key” })

You can take a look at the sitecore documentation on how to activate FXM and use the API https://doc.sitecore.com/developers/90/sitecore-experience-platform/en/fxm-javascript-api.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.