When trackDownloadLinks
(AppMeasurement) or clickCollectionEnabled
(Web SDK) is enabled and a visitor clicks on a link, AppMeasurement checks the URL of the link for filetype extensions. If the link URL contains a matching filetype, a download link image request is automatically sent.
Use linkDownloadFileTypes
to customize what file extensions you want to count as download links.
Only actual clicks are tracked automatically. The following types of links are not automatically tracked:
javascript:openLink()
For these download types, you can manually send a link tracking
call.
If a clicked link matches both exit link and download link criteria, the download link type takes priority.
The Download link qualifier text field uses regex to determine if a clicked link qualifies to be a download link.
Configure the SDK using downloadLinkQualifier
. The field uses regex on the clicked URL to determine if it is a valid download link. If downloadLinkQualifier
is not defined, the default value is set to \\.(exe|zip|wav|mp3|mov|mpg|avi|wmv|pdf|doc|docx|xls|xlsx|ppt|pptx)$
.
alloy("configure", {
"downloadLinkQualifier": "\\.(exe|zip|wav|mp3|mov|mpg|avi|wmv|pdf|doc|docx|xls|xlsx|ppt|pptx)$"
});
Download Extensions is a list of file extensions with a field to add more under the Link Tracking accordion when configuring the Adobe Analytics extension.
Add file extensions to the list by entering text in the field and clicking Add. Remove file extensions from the list by clicking their respective ‘X’ icon.
The s.linkDownloadFileTypes
variable is a string of comma-separated file extensions. Do not use spaces.
If this variable is not defined, automatic download link tracking does not work (even if trackDownloadLinks
is true
).
s.linkDownloadFileTypes = "doc,docx,eps,jpg,png,svg,xls,ppt,pptx,pdf,xlsx,tab,csv,zip,txt,vsd,vxd,xml,js,css,rar,exe,wma,mov,avi,wmv,mp3,wav,m4v";